实验4路由器基本配置及静态路由
- 格式:doc
- 大小:448.00 KB
- 文档页数:5
静态路由与默认路由的配置内容:1.用静态路由使全网联通2.用默认路由使全网联通拓扑图:实验过程:一、基本配置enableconfigure terminalno ip domain-loenable sec ciscoline vty 0 15pass ciscologinexitline con 0pass ciscologinhost R二、配置接口R1:conf tint s0/0ip add 192.168.11.1 255.255.255.0clo r 64000no shexitint s0/1ip add 192.168.12.1 255.255.255.0 clo r 64000no shexitinterface loopback 0ip add 192.168.10.1 255.255.255.0 no shendsh ip int brR2:conf tint s0/0ip add 192.168.11.2 255.255.255.0 clo r 64000no shexitint s0/1ip add 192.168.21.2 255.255.255.0 clo r 64000no shexitinterface loopback 0ip add 192.168.20.1 255.255.255.0 no shendsh ip int brR3:conf tint s0/0ip add 192.168.31.3 255.255.255.0 clo r 64000no shexitint s0/1ip add 192.168.12.3 255.255.255.0 clo r 64000no shexitinterface loopback 0ip add 192.168.30.1 255.255.255.0 no shendsh ip int brR4:conf tint s0/0ip add 192.168.31.4 255.255.255.0 clo r 64000no shexitint s0/1ip add 192.168.21.4 255.255.255.0 clo r 64000no shexitint s0/2ip add 192.168.40.4 255.255.255.0 clo r 64000no shexitendsh ip int brR5:conf tint s0/0ip add 192.168.40.5 255.255.255.0 clo r 64000no shexitint f0/0ip add 192.168.50.5 255.255.255.0 no shexitint f0/1ip add 192.168.51.5 255.255.255.0 no shexitendsh ip int br三、检测连通性用ping命令去测试两个相连的接口是否连通四、配置路由1.1、静态路由的配置R1:conf tip route 192.168.20.0 255.255.255.0 192.168.11.2ip route 192.168.21.0 255.255.255.0 192.168.11.2ip route 192.168.30.0 255.255.255.0 192.168.12.3ip route 192.168.31.0 255.255.255.0 192.168.12.3ip route 192.168.40.0 255.255.255.0 192.168.11.2ip route 192.168.50.0 255.255.255.0 192.168.11.2ip route 192.168.51.0 255.255.255.0 192.168.11.2ip route 192.168.51.0 255.255.255.0 192.168.12.3ip route 192.168.50.0 255.255.255.0 192.168.12.3ip route 192.168.40.0 255.255.255.0 192.168.12.3endR2:conf tip route 192.168.10.0 255.255.255.0 192.168.11.1ip route 192.168.40.0 255.255.255.0 192.168.21.4ip route 192.168.31.0 255.255.255.0 192.168.21.4ip route 192.168.12.0 255.255.255.0 192.168.11.1ip route 192.168.30.0 255.255.255.0 192.168.11.1ip route 192.168.50.0 255.255.255.0 192.168.21.4ip route 192.168.51.0 255.255.255.0 192.168.21.4endR3:conf tip route 192.168.10.0 255.255.255.0 192.168.12.1ip route 192.168.11.0 255.255.255.0 192.168.12.1ip route 192.168.20.0 255.255.255.0 192.168.12.1ip route 192.168.21.0 255.255.255.0 192.168.31.4ip route 192.168.40.0 255.255.255.0 192.168.31.4ip route 192.168.50.0 255.255.255.0 192.168.31.4ip route 192.168.51.0 255.255.255.0 192.168.31.4endR4:conf tip route 192.168.10.0 255.255.255.0 192.168.21.2ip route 192.168.20.0 255.255.255.0 192.168.21.2ip route 192.168.30.0 255.255.255.0 192.168.31.3ip route 192.168.50.0 255.255.255.0 192.168.40.5ip route 192.168.51.0 255.255.255.0 192.168.40.5ip route 192.168.11.0 255.255.255.0 192.168.21.2ip route 192.168.12.0 255.255.255.0 192.168.31.3endR5:conf tip route 192.168.10.0 255.255.255.0 192.168.40.4ip route 192.168.30.0 255.255.255.0 192.168.40.4ip route 192.168.20.0 255.255.255.0 192.168.40.4ip route 192.168.11.0 255.255.255.0 192.168.40.4ip route 192.168.12.0 255.255.255.0 192.168.40.4ip route 192.168.21.0 255.255.255.0 192.168.40.4ip route 192.168.31.0 255.255.255.0 192.168.40.4end配置PC1:IP 192.168.50.1 255.255.255.0GA TEWAY 192.168.50.5配置PC2:IP 192.168.51.1 255.255.255.0GA TEWAY 192.168.51.51.2检测静态路由的配置a、在每台路由器上使用show ip route命令查看路由器的路由表R1路由表:R2路由表:R3路由表:R4路由表R5路由表b、在PC上使用ping命令检测到网络中的各点能否连通2.1在R5上配置默认路由将原来配置的所有静态路由条目删除,然后添加一条默认路由后,使用PC测试连通性进入全局配置模式no ip route 192.168.10.0 255.255.255.0 192.168.40.4no ip route 192.168.20.0 255.255.255.0 192.168.40.4no ip route 192.168.30.0 255.255.255.0 192.168.40.4no ip route 192.168.11.0 255.255.255.0 192.168.40.4no ip route 192.168.12.0 255.255.255.0 192.168.40.4no ip route 192.168.21.0 255.255.255.0 192.168.40.4no ip route 192.168.31.0 255.255.255.0 192.168.40.4ip route 0.0.0.0 0.0.0.0 192.168.40.4实验结果:实验成功完成,在做实验是要注意网关!免得因为网关没配好使得PC机无法与外面的网段ping通!。
一、实训目的本次实训旨在使学生掌握交换机和路由器的基本配置、网络拓扑搭建、VLAN划分、路由协议配置等网络知识,提高学生的实际动手能力和网络规划与部署能力。
二、实训内容1. 交换机配置(1)交换机基本配置:登录交换机,设置管理IP地址、登录密码、超级用户密码等。
(2)VLAN划分:创建VLAN,设置VLAN ID和名称,将端口分配到对应的VLAN。
(3)端口镜像:实现端口镜像功能,实时监控端口流量。
2. 路由器配置(1)路由器基本配置:登录路由器,设置管理IP地址、登录密码、超级用户密码等。
(2)静态路由配置:配置静态路由,实现不同网络之间的互通。
(3)动态路由配置:配置OSPF协议,实现动态路由的自动学习。
(4)NAT配置:配置NAT,实现内部网络访问外部网络。
3. 网络拓扑搭建(1)搭建交换机与路由器之间的物理连接。
(2)配置交换机与路由器之间的链路聚合,提高链路带宽。
(3)配置交换机与路由器之间的VLAN Trunk链路。
三、实训过程1. 准备工作(1)准备交换机和路由器设备。
(2)准备双绞线、交叉线等网络线材。
(3)准备PC机作为客户端设备。
2. 交换机配置(1)登录交换机,设置管理IP地址、登录密码、超级用户密码等。
(2)创建VLAN,设置VLAN ID和名称,将端口分配到对应的VLAN。
(3)配置端口镜像,实现端口流量监控。
3. 路由器配置(1)登录路由器,设置管理IP地址、登录密码、超级用户密码等。
(2)配置静态路由,实现不同网络之间的互通。
(3)配置OSPF协议,实现动态路由的自动学习。
(4)配置NAT,实现内部网络访问外部网络。
4. 网络拓扑搭建(1)搭建交换机与路由器之间的物理连接。
(2)配置交换机与路由器之间的链路聚合。
(3)配置交换机与路由器之间的VLAN Trunk链路。
四、实训结果1. 交换机配置成功,实现VLAN划分和端口镜像功能。
2. 路由器配置成功,实现静态路由、动态路由和NAT功能。
1.5教学实验 1.5.1实验主题●配置静态路由协议1.5.2实验设备●cisco 路由器 超五类双绞线 V.35线缆 pc1.5.3实验拓扑IP 地址分配:R1:F0/0: 191.16.1.254 255.255.255.0 S0/0: 12.12.12.1 255.255.255.0 LOOPBACK1: 171.16.1.1 255.255.255.0 LO2: 171.16.2.1 255.255.255.0 LO3: 171.16.3.1 255.255.255.0 R2:F0/0: 192.16.1.254 255.255.255.0 S0/0: 23.23.23.2 255.255.255.0 S0/1: 12.12.12.2 255.255.255.0s0/0 s0/0 S0/1S0/1 loopback1 lo1 lo2 lo3loopback2 loopback3loopback1 loopback2loopback3DCEDCEDTEDTE12.12.12.0/24 23.23.23.0/24191.16.1.0/24192.16.1.0/24193.16.1.0/24f0/0 f0/0 f0/0 Fa0/24Fa0/24Fa0/24 Fa0/1Fa0/1Fa0/1Fa0/2 Fa0/2 Fa0/2.1.2.1.1.2.2LO1: 172.16.1.1 255.255.255.0LO2: 172.16.2.1 255.255.255.0LO3: 172.16.3.1 255.255.255.0R3:F0/0: 193.16.1.254 255.255.255.0S0/1: 23.23.23.3 255.255.255.0LO1: 173.16.1.1 255.255.255.0LO2: 173.16.2.1 255.255.255.0LO3: 173.16.3.1 255.255.255.0PC1:191.16.1.1 255.255.255.0PC2:191.16.1.2 255.255.255.0PC3:192.16.1.1 255.255.255.0PC4:192.16.1.2 255.255.255.0PC5:193.16.1.1 255.255.255.0PC6:193.16.1.2 255.255.255.0Sw1: 191.16.1.253 255.255.255.0Sw2: 192.16.1.253 255.255.255.0Sw3: 193.16.1.253 255.255.255.01.5.4实验要求●通过静态路由的配置使不同网段能够相互通信。
.路由器技术实验报告《路由器技术》实验指导书一.实验总学时(课外学时/课内学时):22开实验个数: 7二.适用专业:计算机专业三.考核方式及办法:在规定实验时间内完成实验要求,依据实验过程、实验结果和实验报告综合考核。
四.配套的实验教材或指导书:自编实验指导书五. 实验项目:实验一:Packet Tracer软件使用交换机的配置与管理(内容一):认识 Packet Tracer软件Packet Tracher介绍Packet Tracer 是 Cisco 公司针对CCNA认证开发的一个用来设计、配置和故障排除网络的模拟软件。
Packer Tracer 模拟器软件比 Boson 功能强大,比 Dynamips 操作简单,非常适合网络设备初学者使用。
学习任务:1、安装 Packer Tracer;2、利用一台型号为 2960 的交换机将 2pc机互连组建一个小型局域网;3、分别设置pc机的ip 地址;4、验证 pc 机间可以互通。
实验设备:Switch_2960 1 台;PC 2 台;直连线配置信息:PC1IP: 192.168.1.2Submask: 255.255.255.0Gateway: 192.168.1.1PC2IP: 192.168.1.3Submask: 255.255.255.0Gateway: 192.168.1.1(内容二):交换机的基本配置与管理1.实验目标:掌握交换机基本信息的配置管理。
2.实验背景:某公司新进一批交换机,在投入网络以后要进行初始配置与管理,你作为网络管理员,对交换机进行基本的配置与管理。
3.技术原理:交换机的管理方式基本分为两种:带内管理和带外管理。
1.通过交换机的 Console 端口管理交换机属于带外管理;这种管理方式不占用交换机的网络端口,第一次配置交换机必须利用 Console端口进行配置。
2.通过Telnet、拨号等方式属于带内管理。
交换机的命令行操作模式主要包括:●用户模式 Switch>●特权模式 Switch#●全局配置模式 Switch(config)#●端口模式 Switch(config-if)#4.实验步骤:●新建Packet Tracer 拓扑图●了解交换机命令行●进入特权模式(en)●进入全局配置模式(conf t)●进入交换机端口视图模式(int f0/1)●返回到上级模式(exit)●从全局以下模式返回到特权模式(end)●帮助信息(如? 、co?、copy?)●●命令简写(如 conf t)●命令自动补全(Tab)●快捷键(ctrl+c 中断测试,ctrl+z 退回到特权视图)●●Reload重启。
双实验平台的路由实验设计双实验平台的路由实验设计实验一路由器基本配置实验实验二路由器的密码恢复实验实验三路由器的IOS恢复实验实验四路由器通信基础实验实验五静态路由的配置实验实验六RIP路由协议实验实验七OSPF路由协议实验实验八PPP协议实验实验九ACL配置实验实验十NAT配置实验实验十一DHCP配置实验实验十二Packet Tracer综合实验实验一路由器基本配置实验1.1实验目标:通过本实验,我们应该掌握:●通过Console口配置路由器●通过telnet配置设备●基本配置命令1.2 设备要求●路由器一台●PC机一台●网线一根●Console线一根1.3实验环境搭建图1-1实验基本拓扑1.4命令参考1.5 检测PC与路由器的连通性使用ping命令检测,能否ping通路由器;并在PC上运行telnet应用程序登录路由器。
如果没有成功,请检查配置文档实验二路由器的密码恢复实验2.1实验目标:通过本实验,我们应该掌握:●路由器的密码恢复●路由器重置2.2 设备要求●路由器一台●PC机一台●Console线一根2.3实验环境搭建图2-1 实验基本拓扑2.4命令参考真机平台第一步:当我们用console线连接MSR路由器控制时同样需要密码,而这个密码也被遗忘了。
第二步:这时我们可以将MSR路由器的电源关闭,然后在CONSOLE线连接正常的情况下重新启动MSR路由器。
第三步:注意观察终端连接中显示的信息,当出现“press CTRL+B to enter extended boot menu”时我们迅速按下CTRL和B键,这样将进入扩展启动选项。
第四步:在扩展启动选项中有九个选项提供给我们选择,依次是启动CF卡中的系统,进入串口子菜单,进入以太口子菜单,文件控制,修改bootrom的密码,忽略加载系统config文件启动,清空super超级密码,设备操作以及重新启动。
要注意的是清空super超级密码并不是我们要选择的,他只适用于基于密码的验证而不是基于用户名和密码两者验证的方式。
实验八:静态路由实验一、实验目的实验目的:1、了解静态路由配置的环境要求2、掌握静态路由的配置方法3、学会查看路由表,分析路由参数二、实验内容实验内容:1、配置所有PC的ip地址、子网掩码和网关地址2、配置路由器的B类静态路由3、设置路由器R1对路由器R2上的主机网络的地址转发到10.68.1.14、查看路由表,并进行连通性测试三、实验原理实验原理:通过配置所有PC的ip地址、子网掩码和网关地址和静态路由的目的地址、子网掩码、下一跳ip地址的配置实现不同网段之间的PC可以进行互相访问。
四、实验器材实验器材:2台路由器Router,4台PC,5根网线五、实验步骤实验步骤:第一步:建立拓扑,开启所有服务设备第二步:配置所有pc的ip地址、子网掩码和网关地址第三步:双击路由器R1进入命令视图界面,(sysname Rou-R1)修改名称第四步:(interface ethernet0/0/0)进入接口E0/0/0,并配置E0/0/0接口ip地址第五步:(int e0/0/1)进入接口内部端口E0/0/1,并配置E0/0/1接口ip地址第六步:(int s0/0/1)进入接口外部端口S0/0/1,并配置S0/0/1接口ip地址第七步:双击路由器R2进入命令视图界面,(sysname Rou-R2)修改名称第八步:重复第四步到第六步的操作完成接口E0/0/0、E0/0/1、S0/0/0的ip地址配置第九步:ping测试PC1与路由器的连能性第十步:设置从路由器R1到路由器R2的静态路由转发第十一步:设置从路由器R2到路由器R1的静态路由转发第十二步:查看路由表,并重新ping进行连通性测试六、实验结果(数据和图表)结论实验结果(数据和图表)拓扑模型配置4台PC地址配置内部端口E0/0/0接口ip地址配置内部端口E0/0/1接口ip地址配置外部端口S0/0/1接口ip地址由于在华为Ensp中同步串口的时钟速率波特率默认为64Kbps,所以此处不进行特别配置查看路由器R1当前内部接口E0/0/0、E0/0/1配置情况测试路由器R1与PC之间的连能性配置路由器R2:配置内部E0/0/0接口ip地址配置内部E0/0/1接口ip地址配置外部S0/0/0接口ip地址查看路由器R2当前内部接口E0/0/0、E0/0/1配置情况测试路由器R2与PC之间的连能性设置路由器R1上的10.70.0.0和10.71.0.0地址转发到路由器R1的10.68.1.1设置路由器R2上的地址10.65.0.0和10.66.0.0转发到路由器R2的10.68.1.2查看路由表R1的情况查看路由表R2的情况连通性测试七、结果分析与结论结果分析:在实验过程中,发现在进行连通性的检测时,我们在路由器R1上添加指定该网段的路由信息之后,为了使能够实现相互互通,就需要双向添加即同样的在路由器R2上也添加属于该网段的网段的信息,并且静态路由的命令是ip route 目的ip地址子网掩码下一跳ip地址,其中下一跳ip地址是静态路由的根本,没有下一跳地址我们的路由就根本到达不了我们想要去的网域。
实训报告实训一路由基本配置1、实验目的:路由器基本配置及ip设置2、拓扑结构图Router0 fa0/0: 192.168.11.1Fa0/1:192.168.1.1Router1 fa0/0: 192.168.11.2Fa0/1:192.168.2.1Znn1:192.168.1.2Znn2:192.168.2.23、实验步骤Router1Router>en 用户模式进入特权模式Router#conf t 特权模式进入全局模式Enter configuration commands, one per line. End with CNTL/Z.Router(config)#host rznn1 改名字为rznn1rznn1(config)#int fa0/0 进入fa0/0端口rznn1(config-if)#ip add 192.168.11.1 255.255.255.0 设置ip地址rznn1(config-if)#no sh 激活rznn1(config)#int fa0/1rznn1(config-if)#ip add 192.168.1.1 255.255.255.0rznn1(config-if)#no shrznn1#copy run star 保存rznn1#conf trznn1(config)#enable secret password 222 设置密文rznn1#show ip interface b 显示Interface IP-Address OK? Method Status Protocol FastEthernet0/0 192.168.11.1 YES manual up up FastEthernet0/1 192.168.1.1 YES manual up up Vlan1 unassigned YES manual administratively down downrouter 2outer>enRouter#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#host rznn2rznn2(config)#int fa0/0rznn2(config-if)#ip add 192.168.11.2 255.255.255.0rznn2(config-if)#no shrznn2(config)#int fa0/1rznn2(config-if)#ip add 192.168.2.1 255.255.255.0rznn2(config-if)#no shrznn2#copy run starrznn2#conf trznn2(config)#enable secret 222rznn2#show ip interface bInterface IP-Address OK? Method Status ProtocolFastEthernet0/0 192.168.11.2 YES manual up upFastEthernet0/1 192.168.2.1 YES manual up upVlan1 unassigned YES manual administratively down down实训二1、远程登录、密码设置及验证为路由器开设telnet端口,PC机可以远程登陆到Rznn3(Router 1) 拓扑结构图Router0:192.168.1.1Pc:192.168.1.2步骤rznn3>rznn3>enrznn3#conf tEnter configuration commands, one per line. End with CNTL/Z.rznn3(config)#no ip domain lookuprznn3(config)#line cons 0rznn3(config-line)#password znnrznn3(config-line)#loginrznn3(config-line)#no exec-trznn3(config-line)#logg syncrznn3(config-line)#exitrznn3(config)#int fa0/0rznn3(config-if)#ip add 192.168.1.1 255.255.255.0rznn3(config-if)#no shrznn3(config-if)#exitrznn3(config)#line vty 0 4 打通五个端口rznn3(config-line)#password cisco 设置密码rznn3(config-line)#login 保存rznn3(config-line)#exit4、测试:实训三命令组1、目的:八条命令(no ip domain lookup\line cons 0\password\login\no exec-t\logg sync\show version\reload\copy running-config startup-config)\show cdp neighbors)2、拓扑结构图Router0 fa0/0: 192.168.11.1Router1 fa0/0: 192.168.11.23、步骤rznn1#conf tEnter configuration commands, one per line. End with CNTL/Z.1、rznn1(config)#no ip domain lookup 取消域名查找转换2、rznn1(config)#line cons 0 打开cons 0端口3、rznn1(config-line)#password znn 设置密码为znnrznn1(config-line)#login 保存rznn1(config-line)#no exec-t 设置永不超时4、rznn1(config-line)#logg sync 产生日志5、rznn1#show version 显示思科路由系统版本信息Cisco IOS Software, 2800 Software (C2800NM-ADVIPSERVICESK9-M), V ersion 12.4(15)T1, RELEASE SOFTWARE (fc2)Technical Support: /techsupportCopyright (c) 1986-2007 by Cisco Systems, Inc.Compiled Wed 18-Jul-07 06:21 by pt_rel_team6、rznn1#show cdp neighbors 查看路由器连接的相邻路由器的相关信息Capability Codes: R - Router, T - Trans Bridge, B - Source Route BridgeS - Switch, H - Host, I - IGMP, r - Repeater, P - PhoneDevice ID Local Intrfce Holdtme Capability Platform Port IDrznn2 Fas 0/0 139 R C2800 Fas 0/07、rznn1#copy running-config startup-config 保存刚才指令Destination filename [startup-config]? startup-configBuilding configuration...[OK]8、rznn1#reload 重启路由器Proceed with reload? [confirm]System Bootstrap, V ersion 12.1(3r)T2, RELEASE SOFTW ARE (fc1)Copyright (c) 2000 by cisco Systems, Inc.cisco 2811 (MPC860) processor (revision 0x200) with 60416K/5120K bytes of memorySelf decompressing the image :########################################################################## [OK] Restricted Rights Legendrznn1#show ip interface bInterface IP-Address OK? Method Status Protocol FastEthernet0/0 192.168.11.1 YES manual up up FastEthernet0/1 192.168.1.1 YES manual up upVlan1 unassigned YES manual administratively down down9、rznn1(config-if)#ip add 192.168.3.1 255.255.255.0 重置ip地址rznn1#show ip interface bInterface IP-Address OK? Method Status Protocol FastEthernet0/0 192.168.3.1 YES manual up up FastEthernet0/1 192.168.1.1 YES manual up upVlan1 unassigned YES manual administratively down down实训四发现协议1、实训目的通过发现协议显示路由器相邻路由的端口信息2、拓扑结构Router0:192.168.11.1Router1:fa0/0 192.168.11.2Fa0/1 192.168.12.1Router2:192.168.12.23、步骤R1路由器Router>enRouter#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#host r1r1(config)#int fa0/0r1(config-if)#ip add 192.168.11.1 255.255.255.0r1(config-if)#no sh%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to upr1(config-if)#r1(config-if)#exitr1(config)#exitr1#%SYS-5-CONFIG_I: Configured from console by consoler1#show ip interface bInterface IP-Address OK? Method Status Protocol FastEthernet0/0 192.168.11.1 YES manual up down FastEthernet0/1 unassigned YES manual administrative ly down downVlan1 unassigned YES manual administratively down downR2 路由器Router>enRouter#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#host r2r2(config)#int fa0/0r2(config-if)#ip add 192.168.11.2 255.255.255.0r2(config-if)#no sh%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up r2(config-if)#exitr2(config)#exitr2#%SYS-5-CONFIG_I: Configured from console by consoler2#conf tEnter configuration commands, one per line. End with CNTL/Z.r2(config)#int fa0/0r2(config-if)#int fa0/1r2(config-if)#ip add 192.168.12.1 255.255.255.0r2(config-if)#no sh%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to upr2(config-if)#exitr2(config)#exitr2#%SYS-5-CONFIG_I: Configured from console by consoler2#show ip interface bInterface IP-Address OK? Method Status Protocol FastEthernet0/0 192.168.11.2 YES manual up up FastEthernet0/1 192.168.12.1 YES manual up down Vlan1 unassigned YES manual administratively down downR3路由器Router>enRouter#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#host r3r3(config)#int fa0/0r3(config-if)#ip add 192.168.12.2 255.255.255.0r3(config-if)#no sh%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up r3(config-if)#exitr3(config)#exitr3#%SYS-5-CONFIG_I: Configured from console by consoler3#show ip interface bInterface IP-Address OK? Method Status Protocol FastEthernet0/0 192.168.12.2 YES manual up up FastEthernet0/1 unassigned YES manual administratively down downVlan1 unassigned YES manual administratively down downR1发现邻居r1#show cdp neighborsCapability Codes: R - Router, T - Trans Bridge, B - Source Route BridgeS - Switch, H - Host, I - IGMP, r - Repeater, P - PhoneDevice ID Local Intrfce Holdtme Capability Platform Port IDr2 Fas 0/0 165 R C2800 Fas 0/0R2发现邻居r2#show cdp neighborsCapability Codes: R - Router, T - Trans Bridge, B - Source Route BridgeS - Switch, H - Host, I - IGMP, r - Repeater, P - PhoneDevice ID Local Intrfce Holdtme Capability Platform Port IDr1 Fas 0/0 176 R C1841 Fas 0/0r3 Fas 0/1 130 R C1841 Fas 0/0R3发现邻居r3#show cdp neighborsCapability Codes: R - Router, T - Trans Bridge, B - Source Route BridgeS - Switch, H - Host, I - IGMP, r - Repeater, P - PhoneDevice ID Local Intrfce Holdtme Capability Platform Port IDr2 Fas 0/0 166 R C2800 Fas 0/14、总结show 命令(1)show ip interface b (显示端口ip信息)(2)show version (显示ios版本信息)(3)show running-config (显示刚才使用的命令配置信息)(4)show cdp neighbors (显示发现邻居直连设备信息)(5)show interface (显示所有端口详细信息)实训五静态路由1、实验目的:将不同网段的网络配通(ip route)Ip route语法:ip route 目标地址子网掩码相邻路由器接口地址Show ip route2、试验拓扑:Router0:192.168.11.1Router1:fa0/0 192.168.11.2Fa0/1 192.168.12.1Router2:192.168.12.23、实验步骤:Router1Router>enRouter#conf tRouter(config)#host r1r1(config)#int fa0/0r1(config-if)#ip add 192.168.11.1 255.255.255.0r1(config-if)#no sh%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to upr1(config-if)#exitr1(config)#exitr1#show ip interface bInterface IP-Address OK? Method Status ProtocolFastEthernet0/0 192.168.11.1 YES manual up downFastEthernet0/1 unassigned YES manual administratively down downVlan1 unassigned YES manual administratively down downr1#%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up r1#ping 192.168.12.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.12.1, timeout is 2 seconds: .....Success rate is 0 percent (0/5)r1#conf tEnter configuration commands, one per line. End with CNTL/Z.r1(config)#ip route 192.168.12.0 255.255.255.0 192.168.11.2r1(config)#exitr1#ping 192.168.12.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.12.1, timeout is 2 seconds:Success rate is 100 percent (5/5), round-trip min/avg/max = 31/31/32 msr1#ping 192.168.12.2Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.12.2, timeout is 2 seconds: .....Success rate is 0 percent (0/5)r1#ping 192.168.12.2Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.12.2, timeout is 2 seconds:Success rate is 100 percent (5/5), round-trip min/avg/max = 47/62/78 msr1#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area* - candidate default, U - per-user static route, o - ODRP - periodic downloaded static routeGateway of last resort is not setC 192.168.11.0/24 is directly connected, FastEthernet0/0S 192.168.12.0/24 [1/0] via 192.168.11.2Router3Router>enRouter#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#host r3r3(config)#int fa0/0r3(config-if)#ip add 192.168.12.2 255.255.255.0r3(config-if)#no sh%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up r3(config-if)#exitr3(config)#exitr3#%SYS-5-CONFIG_I: Configured from console by consoler3#show ip interface bInterface IP-Address OK? Method Status Protocol FastEthernet0/0 192.168.12.2 YES manual up up FastEthernet0/1 unassigned YES manual administratively down downVlan1 unassigned YES manual administratively down downr3#conf tEnter configuration commands, one per line. End with CNTL/Z.r3(config)#ip route 192.168.11.0 255.255.255.0 192.168.12.1r3(config)#exitr3#ping 192.168.11.2Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.11.2, timeout is 2 seconds:Success rate is 100 percent (5/5), round-trip min/avg/max = 31/31/32 msr3#ping 192.168.11.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.11.1, timeout is 2 seconds:Success rate is 100 percent (5/5), round-trip min/avg/max = 62/62/63 msr3#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area* - candidate default, U - per-user static route, o - ODRP - periodic downloaded static routeGateway of last resort is not setS 192.168.11.0/24 [1/0] via 192.168.12.1C 192.168.12.0/24 is directly connected, FastEthernet0/04、默认路由Route 1r1>enr1#conf tEnter configuration commands, one per line. End with CNTL/Z.r1(config)#no ip route 192.168.12.0 255.255.255.0 192.168.11.2%No matching route to deleter1(config)#exitr1#%SYS-5-CONFIG_I: Configured from console by consoler1#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area* - candidate default, U - per-user static route, o - ODRP - periodic downloaded static routeGateway of last resort is not setC 192.168.11.0/24 is directly connected, FastEthernet0/0r1#conf tEnter configuration commands, one per line. End with CNTL/Z.r1(config)#ip route 0.0.0.0 0.0.0.0 192.168.11.2r1(config)#exitr1#%SYS-5-CONFIG_I: Configured from console by consoler1#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area* - candidate default, U - per-user static route, o - ODRP - periodic downloaded static routeGateway of last resort is 192.168.11.2 to network 0.0.0.0C 192.168.11.0/24 is directly connected, FastEthernet0/0S* 0.0.0.0/0 [1/0] via 192.168.11.2r1#ping 192.168.12.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.12.1, timeout is 2 seconds:Success rate is 100 percent (5/5), round-trip min/avg/max = 16/28/31 msr1#ping 192.168.12.2Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.12.2, timeout is 2 seconds: Success rate is 100 percent (5/5), round-trip min/avg/max = 62/62/63 msRoute 3r1>enr1#conf tEnter configuration commands, one per line. End with CNTL/Z.r1(config)#no ip route 192.168.12.0 255.255.255.0 192.168.11.2%No matching route to deleter1(config)#exitr1#%SYS-5-CONFIG_I: Configured from console by consoler1#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area* - candidate default, U - per-user static route, o - ODRP - periodic downloaded static routeGateway of last resort is not setC 192.168.11.0/24 is directly connected, FastEthernet0/0r1#conf tEnter configuration commands, one per line. End with CNTL/Z.r1(config)#ip route 0.0.0.0 0.0.0.0 192.168.11.2r1(config)#exitr1#%SYS-5-CONFIG_I: Configured from console by consoler1#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area* - candidate default, U - per-user static route, o - ODRP - periodic downloaded static routeGateway of last resort is 192.168.11.2 to network 0.0.0.0C 192.168.11.0/24 is directly connected, FastEthernet0/0S* 0.0.0.0/0 [1/0] via 192.168.11.2r3#ping 192.168.11.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.11.1, timeout is 2 seconds: Success rate is 100 percent (5/5), round-trip min/avg/max = 62/62/63 ms实训六动态路由RIP 协议1、实验目的使用配置动态路由启动Rip协议使用到的命令(router rip/network/show ip protocols/show ip route)2、实验拓扑R1 fa0/0 192.168.11.1R2 fa0/0 192.168.11.2fa0/1 192.168.12.1R3 fa0/0 192.168.12.23、实验步骤R1Router>enRouter#conf tEnter configuration commands, one per line. End with CNTL/Z. Router(config)#host r1r1(config)#int fa0/0r1(config-if)#ip add 192.168.11.1 255.255.255.0r1(config-if)#no shr1(config-if)#exitr1(config)#router ripr1(config-router)#network 192.168.11.0r1(config-router)#exitr1(config)#exitr1#%SYS-5-CONFIG_I: Configured from console by consoleR2Router>enRouter#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#host r2r2(config)#int fa0/0r2(config-if)#ip add 192.168.11.2 255.255.255.0r2(config-if)#no shr2(config-if)#exitr2(config)#int fa0/1r2(config-if)#ip add 192.168.12.1 255.255.255.0r2(config-if)#no shr2(config-if)#exitr2(config)#router ripr2(config-router)#network 192.168.11.0r2(config-router)#network 192.168.12.0r2(config-router)#exitr2(config)#exitr2#R3Router>enRouter#conf tEnter configuration commands, one per line. End with CNTL/Z. Router(config)#host r3r3(config)#int fa0/0r3(config-if)#ip add 192.168.12.2 255.255.255.0r3(config-if)#no shr3(config-if)#exitr3(config)#router ripr3(config-router)#network 192.168.12.0r3(config-router)#exitr3(config)#exitr3#%SYS-5-CONFIG_I: Configured from console by console4、实验测试R1r1#show ip protocolsRouting Protocol is "rip"Sending updates every 30 seconds, next due in 10 secondsInvalid after 180 seconds, hold down 180, flushed after 240 Outgoing update filter list for all interfaces is not setIncoming update filter list for all interfaces is not set Redistributing: ripDefault version control: send version 1, receive any version Interface Send Recv Triggered RIP Key-chain FastEthernet0/0 1 2 1Automatic network summarization is in effectMaximum path: 4Routing for Networks:192.168.11.0Passive Interface(s):Routing Information Sources:Gateway Distance Last UpdateDistance: (default is 120)r1#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area* - candidate default, U - per-user static route, o - ODRP - periodic downloaded static routeGateway of last resort is not setC 192.168.11.0/24 is directly connected, FastEthernet0/0R 192.168.12.0/24 [120/1] via 192.168.11.2, 00:00:24, FastEthernet0/0 r1#ping 192.168.12.0Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.12.0, timeout is 2 seconds: Success rate is 100 percent (5/5), round-trip min/avg/max = 31/31/32 msR2r2#show ip protocolsRouting Protocol is "rip"Sending updates every 30 seconds, next due in 21 secondsInvalid after 180 seconds, hold down 180, flushed after 240Outgoing update filter list for all interfaces is not setIncoming update filter list for all interfaces is not setRedistributing: ripDefault version control: send version 1, receive any versionInterface Send Recv Triggered RIP Key-chain FastEthernet0/0 1 2 1FastEthernet0/1 1 2 1Automatic network summarization is in effectMaximum path: 4Routing for Networks:192.168.11.0192.168.12.0Passive Interface(s):Routing Information Sources:Gateway Distance Last UpdateDistance: (default is 120)r2#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area* - candidate default, U - per-user static route, o - ODRP - periodic downloaded static routeGateway of last resort is not setC 192.168.11.0/24 is directly connected, FastEthernet0/0C 192.168.12.0/24 is directly connected, FastEthernet0/1R3r3#show ip protocolsRouting Protocol is "rip"Sending updates every 30 seconds, next due in 15 secondsInvalid after 180 seconds, hold down 180, flushed after 240Outgoing update filter list for all interfaces is not setIncoming update filter list for all interfaces is not setRedistributing: ripDefault version control: send version 1, receive any versionInterface Send Recv Triggered RIP Key-chain FastEthernet0/0 1 2 1Automatic network summarization is in effectMaximum path: 4Routing for Networks:192.168.12.0Passive Interface(s):Routing Information Sources:Gateway Distance Last UpdateDistance: (default is 120)r3#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area* - candidate default, U - per-user static route, o - ODRP - periodic downloaded static routeGateway of last resort is not setR 192.168.11.0/24 [120/1] via 192.168.12.1, 00:00:04, FastEthernet0/0 C 192.168.12.0/24 is directly connected, FastEthernet0/0r3#ping 192.168.11.0Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.11.0, timeout is 2 seconds: Success rate is 100 percent (5/5), round-trip min/avg/max = 31/31/32 ms实训七负载平衡试训目的实现负载平衡实训拓扑R1 fa0/0 192.168.11.1R2 eth0/0/0 192.168.11.2Fa0/0 192.168.12.1Fa0/0 192.168.13.1R3 fa0/0 192.168.12.2Fa0/1 192.168.14.1R4 fa0/0 192.168.13.2Fa0/1 192.168.15.1R5 fa0/0 192.168.14.2Fa0/1 192.168.15.2实训步骤(R1 )r1>enR1#conf tR1(config)#ip route 0.0.0.0 0.0.0.0 192.168.11.2R1(config)#exitr1#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area* - candidate default, U - per-user static route, o - ODRP - periodic downloaded static routeGateway of last resort is 192.168.11.2 to network 0.0.0.0C 192.168.11.0/24 is directly connected, FastEthernet0/0S* 0.0.0.0/0 [1/0] via 192.168.11.2(R2)r2>enr2(config)#ip route 0.0.0.0 0.0.0.0 192.168.12.2r2(config)#ip route 0.0.0.0 0.0.0.0 192.168.13.2r2(config)#exitr2#%SYS-5-CONFIG_I: Configured from console by consoles% Ambiguous command: "s"r2#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area* - candidate default, U - per-user static route, o - ODRP - periodic downloaded static routeGateway of last resort is 192.168.12.2 to network 0.0.0.0C 192.168.11.0/24 is directly connected, Ethernet0/0/0C 192.168.12.0/24 is directly connected, FastEthernet0/0C 192.168.13.0/24 is directly connected, FastEthernet0/1S* 0.0.0.0/0 [1/0] via 192.168.12.2[1/0] via 192.168.13.2(R3)r3>enr3#conf tEnter configuration commands, one per line. End with CNTL/Z.r3(config)#ip route 0.0.0.0 0.0.0.0 192.168.12.1r3(config)#exitr3#%SYS-5-CONFIG_I: Configured from console by consoler3#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area* - candidate default, U - per-user static route, o - ODRP - periodic downloaded static routeGateway of last resort is 192.168.12.1 to network 0.0.0.0C 192.168.12.0/24 is directly connected, FastEthernet0/0C 192.168.14.0/24 is directly connected, FastEthernet0/1S* 0.0.0.0/0 [1/0] via 192.168.12.1(R4)r4>enr4#conf tEnter configuration commands, one per line. End with CNTL/Z.r4(config)#ip route 0.0.0.0 0.0.0.0 192.168.13.1r4(config)#exitr4#%SYS-5-CONFIG_I: Configured from console by consoler4#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area* - candidate default, U - per-user static route, o - ODRP - periodic downloaded static routeGateway of last resort is 192.168.13.1 to network 0.0.0.0C 192.168.13.0/24 is directly connected, FastEthernet0/0C 192.168.15.0/24 is directly connected, FastEthernet0/1S* 0.0.0.0/0 [1/0] via 192.168.13.1(R5)r5>enr5#conf tEnter configuration commands, one per line. End with CNTL/Z.r5(config)#ip route 0.0.0.0 0.0.0.0 192.168.14.1r5(config)#ip route 0.0.0.0 0.0.0.0 192.168.15.1r5(config)#exitr5#%SYS-5-CONFIG_I: Configured from console by consoler5#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area* - candidate default, U - per-user static route, o - ODRP - periodic downloaded static routeGateway of last resort is 192.168.14.1 to network 0.0.0.0C 192.168.14.0/24 is directly connected, FastEthernet0/0C 192.168.15.0/24 is directly connected, FastEthernet0/1S* 0.0.0.0/0 [1/0] via 192.168.14.1[1/0] via 192.168.15.1实训测试(R1)r1#ping 192.168.14.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.14.1, timeout is 2 seconds:Success rate is 100 percent (5/5), round-trip min/avg/max = 62/84/94 ms (R5)r5#ping 192.168.11.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.11.1, timeout is 2 seconds: Success rate is 100 percent (5/5), round-trip min/avg/max = 79/91/94 ms实训八DHCP 协议配置实训目的全网配通实训拓扑Fa0/0 192.168.11.1Fa0/1 192.168.12.1实训步骤Router>enRouter#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#host r1r1(config)#int fa0/0r1(config-if)#ip add 192.168.11.1 255.255.255.0r1(config-if)#no shr1(config-if)#exitr1(config)#int fa0/1r1(config-if)#ip add 192.168.12.1 255.255.255.0r1(config-if)#no shr1(config-if)#exitr1(config)#ip dhcp pool znn //配置一个根地址池znnr1(dhcp-config)#network 192.168.11.0 255.255.255.0 //为所有客户机动态分配的地址段r1(dhcp-config)#default-router 192.168.11.1 //为客户机配置默认的网关r1(dhcp-config)#dns-server 192.168.11.1 //为客户机配置DNS服务器r1(dhcp-config)#exitr1(config)#ip dhcp pool znn1。
静态路由及默认路由的基本配置首先假设主机PC1与PC3之间如果能够正常连通,那么PC1将发送数据给其网关设备R1;R1收到后将根据数据包中的目的地址查看它的路由表,找到相应的目的网络的所在路由条目,并根据该条目中的下一跳和出接口信息将该数据转发给下一台路由器R2;R2也采取同样的步骤将数据转发给与自己直连的主机PC3;主机PC3在收到数据后,与主机PC1发送数据到PC3的过程一样,再发送相应的回应消息给PC1。
在错误!未找到引用源。
中,用R3来模拟互联网Internet,由于Internet是一个目标范围很广的目标网络,故到达Internet的路由需要配置为默认路由,R3与R1之间使用串口(Serial)相连。
首先在PC1、PC2、PC3、PC4上配置IP地址、子网掩码、默认网关。
对于PC1,其网关地址为192.168.0.1,PC2的网关地址为192.168.1.1,PC3的网关地址为192.168.16.1,PC4的网关地址为192.168.17.1。
各个路由器的基础配置在PC1上测试其与其他计算机的连通性从上面的结果可观察到PC1与PC2互通,但PC1与PC3不能互通在路由表中,“Destination/Mask”列为目标网络的网络号和子网掩码,“Proto”列表示路由协议类型,“Pre”列为优先级(值越小,优先级越高),“Cost”列为到达目标网络的度量值,“Flags”列为路由类型标志,“NextHop”列为相对于当前设备到达目标网络的下一个设备入口IP地址(下一跳地址,如果目标为直连网络,则“NextHop”列值为当前设备出口IP地址),“Interface”列为通往目标网络的本设备出端口编号。
从上面的路由表信息可观察到,路由器默认会自动生成到达其所有直连网络的路由信息,PC1与PC2所属的网络192.168.0.0/24与192.168.1.0/24都在R1中有对应的路由信息,故PC1与PC2的网络是连通的,而PC1发向PC3、PC4的数据包的目标网络分别为192.168.16.0/24、为192.168.17.0/24,这两个目标网络在R1中无对应的路由信息,故PC1与PC3、PC4的网络不通。
一、实验目的本次静态路由实验实训的主要目的是通过实际操作,加深对静态路由原理的理解,掌握静态路由的配置方法,以及了解静态路由在实际网络中的应用。
通过实验,提高网络设备的配置和管理能力,为今后从事网络工作打下基础。
二、实验内容1. 实验环境:使用三台路由器(R1、R2、R3)和一台交换机,搭建一个简单的网络拓扑结构。
2. 实验步骤:(1)配置路由器接口IP地址:为R1、R2、R3配置相应的接口IP地址,并设置子网掩码。
(2)配置静态路由:在R1上配置到达R2的静态路由,在R2上配置到达R3的静态路由,在R3上配置到达R1的静态路由。
(3)测试网络连通性:使用ping命令测试不同路由器之间的连通性。
(4)修改静态路由:修改R1上的静态路由,测试网络连通性是否受到影响。
(5)删除静态路由:删除R2上的静态路由,测试网络连通性是否受到影响。
三、实验过程及结果1. 配置路由器接口IP地址:按照实验要求,为三台路由器的接口配置了相应的IP地址和子网掩码。
2. 配置静态路由:在R1上配置到达R2的静态路由,命令如下:R1> ip route 192.168.2.0 255.255.255.0 192.168.1.2在R2上配置到达R3的静态路由,命令如下:R2> ip route 192.168.3.0 255.255.255.0 192.168.2.2在R3上配置到达R1的静态路由,命令如下:R3> ip route 192.168.1.0 255.255.255.0 192.168.3.23. 测试网络连通性:使用ping命令测试不同路由器之间的连通性,结果如下:R1> ping 192.168.2.2Pinging 192.168.2.2 with 32 bytes of data:Reply from 192.168.2.2: bytes=32 time=1ms TTL=255...R2> ping 192.168.1.2Pinging 192.168.1.2 with 32 bytes of data:Reply from 192.168.1.2: bytes=32 time=1ms TTL=255...R3> ping 192.168.3.2Pinging 192.168.3.2 with 32 bytes of data:Reply from 192.168.3.2: bytes=32 time=1ms TTL=255...4. 修改静态路由:将R1上的静态路由修改为到达R2的下一跳地址为192.168.1.1,命令如下:R1> ip route 192.168.2.0 255.255.255.0 192.168.1.1测试网络连通性,发现连通性受到影响。
三层交换机静态路由配置实验原理三层交换机是一种具备路由功能的网络设备,它可以在不同的网络之间进行数据包转发和路由选择。
静态路由是一种简单的路由配置方法,需要手动设置路由表项来指定数据包的传输路径。
下面是三层交换机静态路由配置实验的基本原理:1. 网络拓扑:首先,需要构建一个具有多个网络子网的拓扑结构。
这可以包括多个三层交换机和多个连接的网络设备(例如路由器或主机)。
2. IP 地址规划:为每个网络子网分配唯一的 IP 地址范围。
确保每个子网具有不同的网络地址,并根据需要分配子网掩码。
3. 三层交换机配置:在每个三层交换机上,配置接口 IP 地址。
这些地址应该属于不同的子网,并且应该与相应网络接口的IP 地址一致。
4. 路由配置:使用静态路由配置命令来设置路由表项。
通过设置适当的路由表项,可以指定数据包的转发路径。
在三层交换机上,可以使用以下命令来配置静态路由:• ip route <目标网络地址> <子网掩码> <下一跳地址>:将目标网络地址和子网掩码映射到下一跳地址。
下一跳地址可以是连接到其他网络的三层交换机或路由器的 IP 地址。
例如:ip route 192.168.2.0 255.255.255.0 192.168.1.2 表示将目标网络地址为192.168.2.0/24 的数据包转发到下一跳地址192.168.1.2。
5. 测试连通性:完成路由配置后,可以进行连通性测试。
通过向不同网络的主机发送数据包,并检查是否能够相互访问,可以验证静态路由配置是否成功。
请注意,静态路由配置是一种最基本的路由配置方法。
在更大规模和复杂的网络环境中,可能需要使用动态路由协议(如OSPF、BGP 等)来实现更灵活和自动化的路由选择。