Cisco路由器静态路由配置实例
静态路由实验报告
实验二静态路由实验一、实验目的1. 掌握静态路由配置方法2. 启用路由器的路由功能3. 查看路由表4. ping和trace命令的使用二、设备需求本实验需要以下设备:1. 4台2811Cisco路由器,四台都有两个FastEthernet口。
2. 2条双绞线,1对V.35背靠背线缆3. 4台带有超级终端程序的PC机,以及4条Console电缆三、拓扑结构及配置说明本实验的拓扑如图2-1所示。
图2-1网络拓扑结构4台路由器分别命名为R1、R2、R3和R4。
所使用的ip地址分配如图1-1所示。
图中的“/24”表示子网掩码为24位,即255.255.255.0。
实验中,应使用静态路由的设置,实现R1到R4在IP层的连通性,即要求从R1可以ping通R4,反之亦然。
四、实验步骤1. 恢复路由器的初始配置。
(若路由器末被配置过则直接做第三步)2. 给路由器命名router>enable //进入特权模式Router #config terminal //进入配置模式Enter configuration commands, one per line. End with CNTL/Z.Router (config) #Router (config)#hostname r1 //给路由器命名R1 (config)#其它路由器配置类似3. 配置端口IPR1 (config)# interface FastEthernet0/1 //进入FastEthernet0/1端口r1(config-if)#ip address 10.1.1.1 255.255.255.0 //指定端口的IP地址及子网掩码r1(config-if)#no shut //开启端口r1(config-if)#exit //退出端口模式R1 (config)#interface Loopback0 //进入本地回环接口0r1(config-if)#ip address 192.168.100.1 255.255.255.0其它路由器配置类似配完各个路由器的名字及IP后,通过sh run(特权模式下的命令)命令查看路由器的配置把你所看到的结果记录下来。
Cisco(思科)路由器静态路由的配置
Cisco(思科)路由器静态路由的配置实验拓扑实验步骤我们要使得 1.1.1.0/24、2.2.2.0/24、3.3.3.0/24 ⽹络之间能够互相通信。
(1)步骤 1:在各路由器上配置 IP 地址、保证直连链路的连通性R1(config)#int loopback0R1(config-if)#ip address 1.1.1.1 255.255.255.0R1(config)#int s0/0/0R1(config-if)#ip address 192.168.12.1 255.255.255.0R1(config-if)#no shutdownR2(config)#int loopback0R2(config-if)#ip address 2.2.2.2 255.255.255.0R2(config)#int s0/0/0R2(config-if)#clock rate 128000R2(config-if)#ip address 192.168.12.2 255.255.255.0R2(config-if)#no shutdownR2(config)#int s0/0/1R2(config-if)#clock rate 128000R2(config-if)#ip address 192.168.23.2 255.255.255.0R2(config-if)#no shutdownR3(config)#int loopback0R3(config-if)#ip address 3.3.3.3 255.255.255.0R3(config)#int s0/0/1R3(config-if)#ip address 192.168.23.3 255.255.255.0R3(config-if)#no shutdown(2)步骤 2:R1上配置静态路由R1(config)#ip route 2.2.2.0 255.255.255.0 s0/0/0//下⼀跳为接⼝形式,s0/0/0 是点对点的链路,注意应该是 R1 上的s0/0/0 接⼝R1(config)#ip route 3.3.3.0 255.255.255.0 192.168.12.2//下⼀跳为IP 地址形式,192.168.12.2 是R2 上的IP 地址(3)步骤 3:R2上配置静态路由R2(config)#ip route 1.1.1.0 255.255.255.0 s0/0/0R2(config)#ip route 3.3.3.0 255.255.255.0 s0/0/1(4)步骤 4:R3上配置静态路由R3(config)#ip route 1.1.1.0 255.255.255.0 s0/0/1R3(config)#ip route 2.2.2.0 255.255.255.0 s0/0/1实验调试(1)在 R1、R2、R3 上查看路由表R1#show ip routeCodes: C - connected, S - static, 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 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static routeo - ODR, P - periodic downloaded static routeGateway of last resort is not setC 192.168.12.0/24 is directly connected, Serial0/0/01.0.0.0/24 is subnetted, 1 subnetsC 1.1.1.0 is directly connected, Loopback02.0.0.0/24 is subnetted, 1 subnetsS 2.2.2.0 is directly connected, Serial0/0/03.0.0.0/24 is subnetted, 1 subnetsS 3.3.3.0 [1/0] via 192.168.12.2R2#show ip routeCodes: C - connected, S - static, 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 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2ia - IS-IS inter area, * - candidate default, U - per-user static routeo - ODR, P - periodic downloaded static routeGateway of last resort is not setC 192.168.12.0/24 is directly connected, Serial0/0/01.0.0.0/24 is subnetted, 1 subnetsS 1.1.1.0 is directly connected, Serial0/0/02.0.0.0/24 is subnetted, 1 subnetsC 2.2.2.0 is directly connected, Loopback03.0.0.0/24 is subnetted, 1 subnetsS 3.3.3.0 is directly connected, Serial0/0/1C 192.168.23.0/24 is directly connected, Serial0/0/1R3#show ip routeCodes: C - connected, S - static, 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 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2ia - IS-IS inter area, * - candidate default, U - per-user static routeo - ODR, P - periodic downloaded static routeGateway of last resort is not set1.0.0.0/24 is subnetted, 1 subnetsS 1.1.1.0 is directly connected, Serial0/0/12.0.0.0/24 is subnetted, 1 subnetsS 2.2.2.0 is directly connected, Serial0/0/13.0.0.0/24 is subnetted, 1 subnets C 3.3.3.0 is directly connected, Loopback0C 192.168.23.0/24 is directly connected, Serial0/0/1(2)从各路由器的环回⼝ ping 其他路由器的环回⼝:R1#ping//不带任何参数的 ping命令,允许我们输⼊更多的参数Protocol [ip]:Target IP address: 2.2.2.2 //⽬标IP地址Repeat count [5]: //发送的ping 次数Datagram size [100]: //ping包的⼤⼩Timeout in seconds [2]: //超时时间Extended commands [n]: y //是否进⼀步扩展命令Source address or interface: 1.1.1.1 //源IP地址Type of service [0]:Set DF bit in IP header? [no]:Validate reply data? [no]:Data pattern [0xABCD]:Loose, Strict, Record, Timestamp, Verbose[none]:Sweep range of sizes [n]:Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:Packet sent with a source address of 1.1.1.1Success rate is 100 percent (5/5), round-trip min/avg/max = 12/14/16 ms//以上说明从 R1 的 loopback0 可以ping 通R2 上的 loopback0。
静态路由(cisco)
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实验要求●通过静态路由的配置使不同网段能够相互通信。
Cisco路由器静态、动态路由配置
Cisco路由器静态、动态路由配置2010-07-22 20:31Cisco路由器静态、动态路由配置本文介绍Cisco路由器静态、动态路由配置,动态路由协议这里只介绍RIP、EIGRP、OSPF三种。
下面是网络拓扑图:如上图网络拓扑,配置路由协议使其网络连通(PC0和PC1互通)。
一、配置静态路由1.配置IP地址信息台式机的IP地址配置很简单,我这里不用多说,PC0 IP:10.3.0.2 NETMASK:255.255.255.0 PC1 IP:192.16.3.2 NETMASK:255.255.255.0 。
下面配置router0下面配置router1这里我们来试试PC0和PC1互通性PC0 ping PC1如图所示:这里我们看到PC0和PC1并不能相通。
PC1 ping PC0如图所示:这里我们看到PC1和PC0也并不能相通。
2.配置静态路由协议Router(config)#ip route 192.16.3.0 255.255.255.0 172.16.2.2 R1(config)#ip route 10.3.0.0 255.255.255.0 172.16.2.1 下面我们再来试试PC0和PC1互通性PC0 ping PC1如图所示:这里我们看到PC0和PC1能相通,我们配置的静态路由协议起作用了。
PC1 ping PC0如图所示:这里我们看到PC1和PC0能相通,我们配置的静态路由协议也起作用了。
二、 RIP路由协议的配置1. 配置IP地址信息配置IP地址信息见上面配置静态路由中配置IP地址信息,我这里不多说。
这里配置了ip地址以后如静态路由中一样,PC0和PC1不能相通。
2. 配置rip路由协议配置router0Router(config)#router ripRouter(config-router)#version 2Router(config-router)#network 10.3.0.0Router(config-router)#network 172.16.2.0配置router1R1(config)#router ripR1(config-router)#version 2R1(config-router)#network 192.16.3.0R1(config-router)#network 172.16.2.03. 查看rip路由信息查看router0查看router1这里我们可以看到R开头的路由信息即是通过rip协议得到的路由信息。
思科Cisco路由器配置——浮动静态路由配置实验详解
思科Cisco路由器配置——浮动静态路由配置实验详解本⽂实例讲述了思科Cisco浮动静态路由配置实验。
分享给⼤家供⼤家参考,具体如下:⼀、实验⽬的:利⽤⼀条静态路由作为两条负载均衡的浮动静态路由⼆、拓扑图如下:三、具体步骤配置(1)R1路由器配置Router>enable --进⼊特权模式Router#configure terminal --进⼊全局配置模式Enter configuration commands, one per line. End with CNTL/Z.Router(config)#hostname R1 --修改路由器名为R1R1(config)#interface s0/0/0 --进⼊端⼝R1(config-if)#clock rate 64000 --设置时钟同步速率R1(config-if)#ip address 192.168.12.1 255.255.255.0 --给端⼝配置ip地址R1(config-if)#no shutdown --激活端⼝%LINK-5-CHANGED: Interface Serial0/0/0, changed state to downR1(config-if)#interface s0/0/1 --进⼊端⼝R1(config-if)#clock rate 64000 --设置时钟同步速率R1(config-if)#ip address 192.168.23.2 255.255.255.0 --给端⼝配置ip地址R1(config-if)#no shutdown --激活端⼝%LINK-5-CHANGED: Interface Serial0/0/1, changed state to downR1(config-if)#exit --返回上⼀级R1(config)#interface l0 --进⼊回环端⼝R1(config-if)#ip address 10.1.1.1 255.255.255.0 --给端⼝配置ip地址R1(config-if)#no shutdown --激活端⼝R1(config-if)#interface f0/0 --进⼊端⼝R1(config-if)#ip address 192.168.13.1 255.255.255.0 --给端⼝配置ip地址R1(config-if)#no shutdown --激活端⼝R1(config-if)#exit --返回上⼀级R1(config)#route rip --开启rip协议R1(config-router)#version 2 --版本2R1(config-router)#no auto-summary --关闭⾃动汇总R1(config-router)#network 192.168.12.0 --添加直连⽹段到RIPR1(config-router)#network 192.168.23.0R1(config-router)#network 10.1.1.0R1(config-router)#exit --返回上⼀级R1(config)#ip route 20.1.1.0 255.255.255.0 192.168.13.2 121 --配置浮动静态路由,级别为121R1(config)#end --返回特权模式(2)R2路由器配置Router>enable --进⼊特权模式Router#configure terminal --进⼊全局配置模式Enter configuration commands, one per line. End with CNTL/Z.Router(config)#hostname R2 --修改路由器名为R2R2(config)#interface s0/0/1 --进⼊端⼝R2(config-if)#clock rate 64000 --配置时钟速率This command applies only to DCE interfacesR2(config-if)#ip address 192.168.12.2 255.255.255.0 --给端⼝配置ip地址R2(config-if)#no shutdown --激活端⼝R2(config-if)#interface s0/0/0 --进⼊端⼝R2(config-if)#clock rate 64000 --为端⼝配置时钟速率This command applies only to DCE interfacesR2(config-if)#ip address 192.168.23.1 255.255.255.0 --给端⼝配置ip地址R2(config-if)#no shutdown --激活端⼝R2(config-if)#exit --返回上⼀级R2(config)#interface l0 --进⼊回环端⼝R2(config-if)#ip address 20.1.1.1 255.255.255.0 --给端⼝配置ip地址R2(config-if)#no shutdown --激活端⼝R2(config-if)#interface f0/1 --进⼊端⼝R2(config-if)#ip address 192.168.13.2 255.255.255.0 --给端⼝配置ip地址R2(config-if)#no shutdown --激活端⼝R2(config-if)#exit --返回上⼀级R2(config)#route rip --开启rip协议R2(config-router)#version 2 --版本2R2(config-router)#no auto-summary --关闭⾃动汇总R2(config-router)#network 192.168.12.0 --添加直连⽹段到RIPR2(config-router)#network 192.168.23.0R2(config-router)#network 20.1.1.0R2(config-router)#exit --返回上⼀级R2(config)#ip route 10.1.1.0 255.255.255.0 192.168.13.1 121 --配置浮动静态路由,级别为121 R2(config)#end --返回特权模式四、验证1、分别查看R1与R2路由表信息(1)R1路由表信息(2)R2路由表信息2、断开两条负载均衡路径(12.0与23.0⽹段)并查看路由表信息(1)R1路由表信息(2)R2路由表信息解释:当两条负载均衡路径断掉,这条浮动的静态路由就会出现。
思科,静态路由实验详细配置教程
思科,静态路由实验详细配置教程PC0:192.168.10.10/24R1g0/0:192.168.10.1/24R1g0/1:200.0.0.1/30PC1:192.168.20.10/24R2g0/0:200.0.0.2/30R2g0/1:192.168.20.1/24R2g0/2:202.0.0.1/30PC2:192.168.30.10/24R4g0/1:202.0.0.2/30R4g0/0:192.168.30.1/24静态路由心法口诀:路由表少什么网络加什么网络静态路由配置命令:ip route XXXX(要添加的网络号).XXXXX(要添加网络的子网掩码).XXXXX(下一跳地址)常用命令:show ip route(查看路由表,在特权模式下查看)注:正确模式下输入正确命令!配置:R1命令:R1>en //进入特权模式R1#conf t //进入全局配置模式R1(config)#inter g0/0 //进入g0/0接口R1(config-if)#ip add 192.168.10.1 255.255.255.0 //给g0/0接口配置IP地址R1(config-if)#no shutdown //激活g0/0接口R1(config-if)#inter g0/1R1(config-if)#ip add 200.0.0.1 255.255.255.252R1(config-if)#no shutdownR1(config-if)#exit(根据心法口诀可以先在特权模式下先执行show ip route(查看路由表)看看少哪些网段少什么网段加什么网段)R1(config)#ip route 192.168.20.0(要添加网络的网络号) 255.255.255.0 200.0.0.2 (下一跳地址这里是R2路由的g0/0接口) //(配置静态路由,把192.168.20.0网络添加的R1的路由表,可以在特权模式下执行show ip route查看)R1(config)#ip route 202.0.0.0 255.255.255.252 200.0.0.2 //(将202.0.0.0段添加到路由表)R1(config)#ip route 192.168.30.0 255.255.255.0 200.0.0.2 //(将192.168.30.0段添加到路由表)R2命令:R2>enR2#conf tR2(config)#inter g0/0R2(config-if)#ip add 200.0.0.2 255.255.255.252R2(config-if)#no shutdownR2(config-if)#inter g0/1R2(config-if)#ip add 192.168.20.1 255.255.255.0R2(config-if)#no shutdownR2(config-if)#inter g0/2R2(config-if)#ip add 202.0.0.1 255.255.255.252R2(config-if)#no shutdownR2(config-if)#exitR2(config)#ip route 192.168.10.0 255.255.255.0 200.0.0.1 R2(config)#ip route 192.168.30.0 255.255.255.0 202.0.0.2R4命令:R4>enR4#conf tR4(config)#inter g0/1R4(config-if)#ip add 202.0.0.2 255.255.255.252R4(config-if)#no shutdownR4(config-if)#inter g0/0R4(config-if)#ip add 192.168.30.1 255.255.255.0R4(config-if)#no shutdownR4(config-if)#exitR4(config)#ip route 192.168.10.0 255.255.255.0 202.0.0.1 R4(config)#ip route 200.0.0.0 255.255.255.252 202.0.0.1 R4(config)#ip route 192.168.20.0 255.255.255.0 202.0.0.1用pc ping测试,全网互通有兴趣朋友可以了解更多java教程/java/video.shtml。
实验22 静态路由和默认路由配置
实验22 静态和缺省路由配置【背景知识】教材5.1-5.3, 掌握路由表的概念,理解路由表的内容,理解IP路由过程,掌握静态路由和缺省路由的配置。
静态路由为管理员在路由器中手动配置的固定路由,不能对网络的改变作出反应,用于网络规模不大、拓扑结构相对固定的网络。
【实验拓扑】使用Cisco Packet Tracer5.2 构建拓扑结构图8.30。
【实验内容】(1) 选择三台C2811 路由器,分别关闭电源后添加WIC-2T 模块,添加位置为插槽0/接口适配器0(即4个小插槽中位于右下角的那个插槽)。
添加两台计算机分别连接C2811A 和C2811B 路由器的f0/1 接口,计算机IP地址与网关设置如图所示。
注意连线的时候,要用手动连线,不要用自动连线,这样才能根据图1选择正确的接口类型和编号。
(2) 按实验线路连接图完成各个路由器接口的IP地址设置,其中serial 接口采用默认HDLC封装即可(即不用配置封装),注意DCE接口要配置时钟频率。
测试C2811A 与192.168.10.2之间、C2811A与C2811B之间、C2811A与Internet接入路由器之间相互ping 通,测试C2811B 与192.168.30.2 之间相互ping通。
(3) 完成以上配置之后,192.168.30.2 与192.168.10.2 之间无法ping通,思考无法ping通的原因是什么。
(4) 参阅教材5.3中内容,在C2811A上配置到达192.168.30.0/24的静态路由,在C2811A上配置到达Internet的缺省路由。
在C2811B上配置到达192.168.10.0/24 和Internet的缺省路由。
在Internet接入路由器上配置到达192.168.0.0/16 的静态路由。
(5) 在各台路由器上使用show ip route 查看路由表,详细理解路由表的内容。
(6) 192.168.30.2 与192.168.10.2 之间相互ping 通,192.168.30.2 与10.1.1.1 之间相互ping 通。
思科路由器配置命令详解及实例
思科路由器配置命令详解及实例思科路由器配置命令详解及实例一、路由器基本配置1.1 登录路由器为了配置和管理思科路由器,您需要登录到路由器的控制台或通过远程登录方式。
使用以下命令登录路由器,并进行必要的身份验证:```Router> enableRouterconfigure terminalEnter configuration commands, one per line: End with TL/Z:Router(config)hostname [路由器名称]Router(config)enable secret [密码]Router(config)line console 0Router(config-line)password [密码]Router(config-line)logging synchronousRouter(config-line)exitRouter(config)line vty 0 4Router(config-line)password [密码]Router(config-line)logging synchronous```1.2 配置接口接下来,您需要配置路由器的接口,以便与其他网络设备进行通信。
使用以下命令配置接口:```Router(config)interface [接口类型] [接口编号]Router(config-if)ip address [IP地址] [子网掩码]Router(config-if)no shutdownRouter(config-if)exit```二、路由配置2.1 静态路由静态路由是手动配置的路由项,将特定的网络目的地与下一跳路由器关联起来。
以下是配置静态路由的示例命令:```Router(config)ip route [目的网络] [子网掩码] [下一跳地址]```2.2 动态路由动态路由是通过路由协议动态学习并自动更新的路由项。
Cisco路由器静态路由和默认路由的配置
实验四 Cisco路由器静态路由和默认路由的配置(验证性)(2学时)一、实验目的1.进一步熟悉Cisco路由器的配置环境2.掌握Cisco路由器静态路由的配置方法3.掌握Cisco路由器默认路由的配置方法二、实验内容(一)静态路由的配置建立如上所示的拓扑结构,现在需要完成的就是让HostA能和HostB互相ping通。
具体配置如下:router1的配置:Press Enter to StartRouter>Router>enRouter#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#hostname router1router1(config)#interface e0router1(config-if)#ip address 192.168.1.2 255.255.255.0router1(config-if)#no shut%LINK-3-UPDOWN: Interface Ethernet0, changed state to uprouter1(config-if)#interface s0router1(config-if)#ip address 192.168.2.1 255.255.255.0router1(config-if)#clock rate 6400 //clock rate是dce设备给dte设备提供时钟频率的,需要在dce里面设置,而另外的一个路由器里面则不用设置router1(config-if)#no shut%LINK-3-UPDOWN: Interface Serial0, changed state to uprouter1(config-if)#end%LINK-3-UPDOWN: Interface Serial0, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to downrouter1#config tEnter configuration commands, one per line. End with CNTL/Z.router1(config)#ip route 192.168.3.0 255.255.255.0 192.168.2.1 //设定静态路由router1(config)#ip route 192.168.2.0 255.255.255.0 192.168.2.1router1(config)#endrouter1#copy running startupDestination filename [startup-config]?Building configuration...[OK]%LINK-3-UPDOWN: Interface Serial0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to uprouter2的配置:Press Enter to StartRouter>enRouter#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#interface e0Router(config-if)#endRouter#config tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#hostname router2router2(config)#interface s0router2(config-if)#ip address 192.168.2.2 255.255.255.0router2(config-if)#no shut%LINK-3-UPDOWN: Interface Serial0, changed state to uprouter2(config-if)#interface s0router2(config-if)#interface e0router2(config-if)#ip address 192.168.3.1 255.255.255.0router2(config-if)#no shut%LINK-3-UPDOWN: Interface Ethernet0, changed state to uprouter2(config-if)#endrouter2#config tEnter configuration commands, one per line. End with CNTL/Z.router2(config)#ip route 192.168.1.0 255.255.255.0 192.168.2.2router2(config)#ip route 192.168.2.0 255.255.255.0 192.168.2.2router2(config)#endrouter2#copy running startupDestination filename [startup-config]?Building configuration...[OK]router2#ping 192.168.1.2Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 msrouter2#ping 192.168.2.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.2.1, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 msrouter2#ping 192.168.2.2Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.2.2, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms //路由器之间试ping 一下,应该可以ping通,接下来配pcpc1的配置如下:Boson BOSS 5.0Copyright 1998-2003 Boson Software, Inc.Use the command help to get startedPress Enter to beginC:>ipconfig /ip 192.168.1.1 255.255.255.0 //此时尚未指定网关C:>ping 192.168.2.1Pinging 192.168.2.1 with 32 bytes of data:Request timed out.Request timed out.Request timed out.Request timed out.Request timed out.Ping statistics for 192.168.2.1:Packets: Sent = 5, Received = 0, Lost = 5 (100% loss), //未指定网关时不能ping通router1的s0Approximate round trip times in milli-seconds:Minimum = 0ms, Maximum = 0ms, Average = 0msC:>ipconfig /dg 192.168.1.2 //指定网关为与本机直连的router1的e0口C:>ping 192.168.1.2Pinging 192.168.1.2 with 32 bytes of data:Reply from 192.168.1.2: bytes=32 time=60ms TTL=241Reply from 192.168.1.2: bytes=32 time=60ms TTL=241Reply from 192.168.1.2: bytes=32 time=60ms TTL=241Reply from 192.168.1.2: bytes=32 time=60ms TTL=241Reply from 192.168.1.2: bytes=32 time=60ms TTL=241Ping statistics for 192.168.1.2: Packets: Sent = 5, Received = 5, Lost = 0 (0% loss), Approximate round trip times in milli-seconds:Minimum = 50ms, Maximum = 60ms, Average = 55msC:>ping 192.168.2.1Pinging 192.168.2.1 with 32 bytes of data:Reply from 192.168.2.1: bytes=32 time=60ms TTL=241Reply from 192.168.2.1: bytes=32 time=60ms TTL=241Reply from 192.168.2.1: bytes=32 time=60ms TTL=241Reply from 192.168.2.1: bytes=32 time=60ms TTL=241Reply from 192.168.2.1: bytes=32 time=60ms TTL=241Ping statistics for 192.168.2.1: Packets: Sent = 5, Received = 5, Lost = 0 (0% loss), //指定网关后可以ping通s0口了Approximate round trip times in milli-seconds:Minimum = 50ms, Maximum = 60ms, Average = 55msC:>ping 192.168.2.2Pinging 192.168.2.2 with 32 bytes of data:Reply from 192.168.2.2: bytes=32 time=60ms TTL=241Reply from 192.168.2.2: bytes=32 time=60ms TTL=241Reply from 192.168.2.2: bytes=32 time=60ms TTL=241Reply from 192.168.2.2: bytes=32 time=60ms TTL=241Reply from 192.168.2.2: bytes=32 time=60ms TTL=241Ping statistics for 192.168.2.2: Packets: Sent = 5, Received = 5, Lost = 0 (0% loss), Approximate round trip times in milli-seconds:Minimum = 50ms, Maximum = 60ms, Average = 55msC:>ping 192.168.3.1Pinging 192.168.3.1 with 32 bytes of data:Reply from 192.168.3.1: bytes=32 time=60ms TTL=241Reply from 192.168.3.1: bytes=32 time=60ms TTL=241Reply from 192.168.3.1: bytes=32 time=60ms TTL=241Reply from 192.168.3.1: bytes=32 time=60ms TTL=241Reply from 192.168.3.1: bytes=32 time=60ms TTL=241Ping statistics for 192.168.3.1: Packets: Sent = 5, Received = 5, Lost = 0 (0% loss), Approximate round trip times in milli-seconds:Minimum = 50ms, Maximum = 60ms, Average = 55ms//可以ping通任意一台设备的IP地址,实验成功C:>pc2 的配置如下:Boson BOSS 5.0Copyright 1998-2003 Boson Software, Inc.Use the command help to get startedPress Enter to beginC:>C:>ipconfig /ip 192.168.3.1 255.255.255.0C:>ipconfig /dg 192.168.3.1 //把IP和网关设好C:>ping 192.168.1.1Pinging 192.168.1.1 with 32 bytes of data:Reply from 192.168.1.1: bytes=32 time=60ms TTL=241Reply from 192.168.1.1: bytes=32 time=60ms TTL=241Reply from 192.168.1.1: bytes=32 time=60ms TTL=241Reply from 192.168.1.1: bytes=32 time=60ms TTL=241Reply from 192.168.1.1: bytes=32 time=60ms TTL=241Ping statistics for 192.168.1.1: Packets: Sent = 5, Received = 5, Lost = 0 (0% loss), Approximate round trip times in milli-seconds:Minimum = 50ms, Maximum = 60ms, Average = 55msC:>ping 192.168.1.2Pinging 192.168.1.2 with 32 bytes of data:Reply from 192.168.1.2: bytes=32 time=60ms TTL=241Reply from 192.168.1.2: bytes=32 time=60ms TTL=241Reply from 192.168.1.2: bytes=32 time=60ms TTL=241Reply from 192.168.1.2: bytes=32 time=60ms TTL=241Reply from 192.168.1.2: bytes=32 time=60ms TTL=241Ping statistics for 192.168.1.2: Packets: Sent = 5, Received = 5, Lost = 0 (0% loss), Approximate round trip times in milli-seconds:Minimum = 50ms, Maximum = 60ms, Average = 55msC:>ping 192.168.2.1Pinging 192.168.2.1 with 32 bytes of data:Reply from 192.168.2.1: bytes=32 time=60ms TTL=241Reply from 192.168.2.1: bytes=32 time=60ms TTL=241Reply from 192.168.2.1: bytes=32 time=60ms TTL=241Reply from 192.168.2.1: bytes=32 time=60ms TTL=241Reply from 192.168.2.1: bytes=32 time=60ms TTL=241Ping statistics for 192.168.2.1: Packets: Sent = 5, Received = 5, Lost = 0 (0% loss), Approximate round trip times in milli-seconds:Minimum = 50ms, Maximum = 60ms, Average = 55msC:>ping 192.168.2.2Pinging 192.168.2.2 with 32 bytes of data:Reply from 192.168.2.2: bytes=32 time=60ms TTL=241Reply from 192.168.2.2: bytes=32 time=60ms TTL=241Reply from 192.168.2.2: bytes=32 time=60ms TTL=241Reply from 192.168.2.2: bytes=32 time=60ms TTL=241Reply from 192.168.2.2: bytes=32 time=60ms TTL=241Ping statistics for 192.168.2.2: Packets: Sent = 5, Received = 5, Lost = 0 (0% loss), Approximate round trip times in milli-seconds:Minimum = 50ms, Maximum = 60ms, Average = 55msC:>ping 192.168.3.1Pinging 192.168.3.1 with 32 bytes of data:Reply from 192.168.3.1: bytes=32 time=60ms TTL=241Reply from 192.168.3.1: bytes=32 time=60ms TTL=241Reply from 192.168.3.1: bytes=32 time=60ms TTL=241Reply from 192.168.3.1: bytes=32 time=60ms TTL=241Reply from 192.168.3.1: bytes=32 time=60ms TTL=241Ping statistics for 192.168.3.1: Packets: Sent = 5, Received = 5, Lost = 0 (0% loss), Approximate round trip times in milli-seconds:Minimum = 50ms, Maximum = 60ms, Average = 55ms //可以ping通任意一台设备的IP地址,实验成功(二)默认路由的配置建立如上所示的拓扑结构。
思科网络实验报告2静态路由的配置
集美大学计算机工程学院实验报告实验名称基本静态路由配置课程名称计算机网络班级日期成绩一、实验目的1、为接口分配适当的地址,并进行记录。
2、根据拓扑图进行网络布线。
3、清除启动配置并将路由器重新加载为默认状态。
4、在路由器上执行基本配置任务。
5、配置并激活串行接口和以太网接口。
6、确定适当的静态路由、总结路由和默认路由。
二、实验场景对一个网络地址进行子网划分以便完成拓扑结构图所示的网络编址。
连接到ISP 路由器的LAN 编址和HQ 与ISP 路由器之间的链路已经完成。
但还需要配置静态路由以便非直连网络中的主机能够彼此通信。
实际拓扑图:三、实验器材(1)直通以太网电缆 3条(2)交叉以太网电缆 1条(3)PC机 3台(4)路由器 3台(5)交换器 2台四、实验内容任务1:对地址空间划分子网步骤1:研究网络要求。
在网络设计中,使用192.168.2.0/24 地址空间。
对该网络进行子网划分,以提供足够的IP 地址来支持60 台主机。
步骤2:创建网络设计时思考以下问题:需要将192.168.2.0/24 网络划分为多少个子网?__4个___这些子网的网络地址分别是什么?子网0:_192.168.2. 0/26__________________________子网1:_192.168.2.64/26__________________________子网2:_192.168.2.128/26_________________________子网3:_192.168.2.192/26_________________________这些网络以点分十进制格式表示的子网掩码是什么?__255.255.255.192________________________以斜杠格式表示的网络子网掩码是什么?_/26____每个子网可支持多少台主机?__62______步骤3:为拓扑图分配子网地址。
1. 将子网1 分配给连接到HQ 的LAN。
思科静态路由配置用路由连接两个网络全解
实验五路由器的基本配置注意事项:主机与路由器连接要用交叉线。
一、实验原理1.1 路由器简介路由器是一个工作在OSI参考模型第三层的网络设备,其主要功能是检查数据包中与网络层相关的信息,然后根据某些规则转发数据包。
路由器的硬件组件包括如下:中央处理单元,随即存储器,闪存,非易失的RAM,只读内存,路由器接口。
路由器的软件同交换机一样,也包括一个引导系统和核心操作系统。
1.2 路由器的配置方式路由器可以通过5种方式来配置:Console终端视图、AUX口远程视图、远程TELNET视图、哑终端视图和FTP下载配置文件视图。
其中通过Console口和远程TELNET配置方式是最常用的两种。
1.3 命令行操作模式用户模式:进入路由器后的第一个模式。
提示符为:Ruijie>特权模式:用户模式的下一级模式,该模式下可以对路由器的配置文件进行管理,查看路由器的配置信息等。
提示符为:Ruijie #全局配置模式:特权模式的下一级模式,可配置路由器的全局性参数(如:名字,登陆信息等);可进入下一级配置模式,对路由器具体的功能进行配置。
提示符为:Ruijie(config)#端口模式:可对路由器的端口进行参数配置。
路由器的fastethernet接口:默认情况下,10M/100M自适应、双工模式自适应;且默认处于关闭状态。
可为端口配置IP地址。
路由器命令行支持获取帮助信息、命令简写等二、实验内容:路由器基本配置三、实验目的:端口的配置。
fastethernet掌握路由器命令行各种操作模式、全局的基本配置和四、实验设备:RG-RSR20路由器、主机、交叉线。
五、实验步骤:步骤1、路由器命令行操作模式的进入:Ruijie>enable ! 进入特权模式Ruijie#Ruijie#configure terminal !进入全局配置模式Ruijie(config)#Ruijie(config)#interface fastethernet 0/1 !进入路由器F1/0的端口模式Ruijie(config-if)#Ruijie(config-if)#exit !退回到上一级操作模式Ruijie(config)#Ruijie(config-if)#end !直接退回到特权模式Ruijie#步骤2、路由器命令行基本功能:帮助信息Ruijie>? !显示当前模式下所有可执行的命令Ruijie#dir ! 显示当前路径的文件或文件夹Ruijie#del config-text ! 删除路由器原有的配置信息步骤3、命令简写:Ruijie#conf ter 的作用同Ruijie#configure terminal步骤4、全局的基本配置:Ruijie(config)# hostname RouterA !配置路由器的设备名称为RouterARouterA (config)#步骤5、端口参数的配置Ruijie(config)#interface fastethernet 0/1 !进入F1/0的端口模式Ruijie(config-if)# ip address 202.201.160.1 255.255.255.0 !为端口配置IP Ruijie(config-if)#no shutdown !开启该端口,使端口转发数据端口速率参数有:10(10Mb/s)、100(100Mb/s)、auto(自适应)(默认)(默认)(自适应)auto、(半双工)half、(全双工)full双工模式有:Ruijie#show running-config ! 查看路由器的配置Ruijie#show interface fastethernet 1/0 !查看路由器端口的配置实验六用路由器连接两个网络【实验名称】用路由器连接两个网络【实验目的】掌握通过路由器实现两个网络的互连【实验设备】RG-RSR20路由器(1台),计算机(2台),交叉线(2条)【实验拓扑】1 用路由器连接两个网络图【实现功能】两个网络的互通【实验步骤】第一步:参照上图,配置PCA和PCB的IP地址、子网掩码和网关。
路由器的静态路由和默认路由配置实验报告.doc
路由器的静态路由和默认路由配置实验报告实验3 路由器的静态路由、默认路由一.实验目的掌握路由器静态路由、默认路由的配置方法二.实验要点通过对路由器0 、路由器1和路由器2 在路由表里添加静态路由、默认路由,使三个路由器的所连的各个网络可以ping 通,反之亦然. 三.实验设备路由器Cisco 2811 三台,交换机Cisco 2950 三台,带有网卡的工作站PC至少6台,控制台电缆二条,路由器交换机和电脑之间的连接线若干条。
四、实验拓朴图3-1 路由器的静态路由、默认路由实验五.实验步骤1.按图3-1 连接路由器和各工作站。
2.按图3-1 配置路由器和各工作站IP 地址等参数。
l在路由器0 假设为DCE 端上routeren routerconf t routerconfigint s1/0 routerconfig-ifip ad 192.168.1.1 255.255.255.0 routerconfig-ifclra 64000 routerconfig-ifno sh routerconfigint f0/0 routerconfig-ifip ad 192.168.5.1 255.255.255.0 routerconfig-ifno sh routerconfig-ifexit l在路由器 1 routeren routerconf t routerconfigint serial 1/0 routerconfig-ifip address 192.168.1.2 255.255.255.0 routerconfig-ifno shutdown routerconfigint serial 1/1 routerconfig-ifip ad 192.168.2.2 255.255.255.0routerconfig-ifno sh routerconfigint f0/0 routerconfig-ifip ad 192.168.4.1 255.255.255.0 routerconfig-ifno sh routerconfig-ifexit l在路由器2 假设为DTE 端上routeren routerconf t routerconfigint s1/0 routerconfig-ifip ad 192.168.2.1 255.255.255.0 routerconfig-ifno sh routerconfigint f0/0 routerconfig-ifip ad 192.168.3.1 255.255.255.0 routerconfig-ifno sh routerconfig-ifexit 实验结果a.在路由器0 上是否能ping通路由器2 的串口S0/0 192.168.2.2 b 在路由器0 上是否能ping通路由器 2 的以太口F0/0 192.168.3.1 c.在路由器2 上是否能ping通路由器0 的以太口F0/0 192.168.5.1 d.在路由器 2 上是否能ping通路由器0 的串口F0/0 192.168.1.1 3.配置路由器Router0 和RouterB 上的静态路由。
Cisco路由器配置实例(经典)
实训报告实训一路由基本配置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(config-if)#exitrznn1(config)#exitrznn1#copy running-config startup-config 保存Destination filename [startup-config]? startup-configrznn1#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 upVlan1 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 running-config startup-config 保存Destination filename [startup-config]? startup-configrznn2(config-if)#exitrznn2(config)#exitrznn2#conf trznn2(config)#enable secret 222rznn2#show ip interface bInterface IP-Address OK? Method Status Protocol FastEthernet0/0 192.168.11.2 YES manual up up FastEthernet0/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), Version 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, Version 12.1(3r)T2, RELEASE SOFTWARE (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 up Vlan1 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 administratively 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 upFastEthernet0/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 2i - 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 2i - 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 znn1r1(dhcp-config)#network 192.168.12.0 255.255.255.0r1(dhcp-config)#default-router 192.168.12.1r1(dhcp-config)#dns-server 192.168.12.1r1(dhcp-config)#exit。
实验6-路由器组网及静态路由配置(Cisco Packet Tracer)
实验6 路由器组网及静态路由配置(Cisco Packet Tracer)(设计性实验)1.实验目的1.掌握IP数据报转发的基本原理;2.掌握静态路由表的配置方法;3.进一步学习模拟软件“Cisco Packet Tracer ”4.初步了解Cisco系列路由器的基本配置方法(在路由器用户命令状态、特权命令状态、全局设置状态、局部设置状态等的参数配置方法);5.根据实验要求,设计正确的解决方案。
2.实验设备与环境1. 仿真软件Cisco Packet Tracer,或Cisco路由器若干台;2. 台式计算机3. 实验准备1.路由器的配置方法一般来说,可以用5种方式来设置路由器,其中包括Console 口接终端或运行终端仿真软件的微机;AUX口接MODEM,通过电话线与远方的终端或运行终端仿真软件的微机相连;通过以太网上的TFTP服务器;通过以太网上的TELNET程序;通过以太网上的SNMP 网管工作站。
第一次设置必须通过上述第一种方式进行。
2.Cisco IOSCisco IOS即Cisco网间网操作系统软件,它满足了端到端网络连接要求,并提供了网络扩展性,模块化结构和移植性,以及多媒体,安全性,网络管理,拨号和Internet应用等许多内嵌功能内。
Cisco IOS技术共有15000种特性,可以提供Internet智能,它可将各种不同的硬件连接起来,构筑成有效、无缝的基础设施,从而大大促进网络的增长和新应用的部署。
3.学习有关Cisco路由器的参数配置方法a)命令状态1)普通用户命令状态router>路由器处于普通用户命令状态。
这时用户可以看到路由器的连接状态,访问其它网络和主机,但不能看到和更改路由器的设置内容。
2)超级用户命令状态router#在router>提示符下键入enable路由器进入超级用户命令状态router#,这时不但可以执行所有的用户命令,还可以看到和更改路由器的设置内容。
思科路由器静态路由配置实验案例详解
思科路由器静态路由配置实验案例详解本⽂实例讲述了思科路由器静态路由配置实验。
分享给⼤家供⼤家参考,具体如下:实验⼋ 路由器静态路由配置⼀、实验⽬标1. 掌握静态路由的配置⽅法和技巧;2. 掌握通过静态路由⽅式实现⽹络的连通性;3. 熟悉⼴域⽹线缆的链接⽅式;⼆、实验背景 学校有新旧两个校区,每个校区是⼀个独⽴的局域⽹,为了使新旧校区能够正常相互通讯,共享资源。
每个校区出⼝利⽤⼀台路由器进⾏连接,两台路由器间学校申请了⼀条2M的DDN专线进⾏相连,要求做适当配置实现两个校区的正常相互访问。
三、技术原理1. 路由器属于⽹络层设备,能够根据IP包头的信息,选择⼀条最佳路径,将数据包转发出去。
实现不同⽹段的主机之间的互相访问。
路由器是根据路由表进⾏选路和转发的。
⽽路由表⾥就是由⼀条条路由信息组成。
2. ⽣成路由表主要有两种⽅法:⼿⼯配置和动态配置,即静态路由协议配置和动态路由协议配置。
3. 静态路由是指有⽹络管理员⼿⼯配置的路由信息。
4. 静态路由除了具有简单、⾼效、可靠的优点外,它的另⼀个好处是⽹络安全保密性⾼。
5. 缺省路由可以看做是静态路由的⼀种特殊情况。
当数据在查找路由表时,没有找到和⽬标相匹配的路由表项时,为数据指定路由。
四、实验步骤 新建packet tracer拓扑图 (1)在路由器R1、R2上配置接⼝的IP地址和R1串⼝上的时钟频率; (2)查看路由器⽣成的直连路由; (3)在路由器R1、R2上配置静态路由; (4)验证R1、R2上的静态路由配置; (5)将PC1、PC2主机默认⽹关分别设置为路由器接⼝fa 1/0的IP地址; (6)PC1、PC2主机之间可以相互通信;五、实验设备 pc 2台;Router-PT可扩展路由 2台(Switch_2811⽆V.35线接⼝);Switch_2960 2台;DCE 串⼝线;直连线;交叉线六、实验拓扑图七、实验命令PC1IP: 192.168.1.2Submask: 255.255.255.0Gateway: 192.168.1.1PC2IP: 192.168.2.2Submask: 255.255.255.0Gateway: 192.168.2.1R1enconf thostname R1int fa 1/0no shutip address 192.168.1.1 255.255.255.0exitint serial 2/0no shutip address 192.168.3.1 255.255.255.0clock rate 64000(必须配置时钟才可通信)endR2enconf thostname R2int fa 1/0no shutip address 192.168.2.1 255.255.255.0exitint serial 2/0ip address 192.168.3.2 255.255.255.0no shutendR1enconf tip route 192.168.2.0 255.255.255.0 192.168.3.2endshow ip routeR2enconf tip route 192.168.1.0 255.255.255.0 192.168.3.1endshow ip route⼋、实验结果 配置PC0、PC1的IP地址: 配置R1,R2接⼝的IP 地址和R1串⼝上的时钟频率: 在路由器R1、R2上配置静态路由,验证R1、R2上的静态路由配置 PC0 ping PC1:。
实验一:Cisco模拟器静态路由实验
• 3、连线的时候注意,PC——交换机用直通线,交换机——路由器用直通 线,路由器——路由器用交叉线。
• 配置完毕后,首先测试PC能否连接各自网关
• 我们从左到右依次配置测试各设备 • 用PC1ping路由器A的fa1/0端口,看是否能ping通?
实验一:Cisco模拟器静态 路由实验
通过实现两台PC互联实验掌握路由的用法和原理
实验条件
• Cisco模拟器6.0(仿真实验)
一、组网:请按照下面图例组网并配置好端口的IP地址,并连线。
• 注意事项:
• 1、可以在路由器和PC间用交换机连接,因为在真实环境里,PC网卡速率 往往和路由器不匹配,无法直连,所以我们可以用交换机做一个中转(交 换机的端口一般都是自适应的,上可连路由器,下可连PC)。
上配置静态路由
• 继续验证,发现通了。
• 为什么通了?因为数据包到达C了,并且在上一个步骤,C已经通过静态路由知道要回复 192.168.1.101应该们先不做验证,我们自己推导一下: • 数据包能否到达D的fa0/0?当然可以,因为数据包能够到达C的fa1/0,并且D的fa0/0和C的fa1/0处于同一个
• 告诉ABCD,剩下两个网段11.0.0.0 10.0.0.0在哪里 • 因为D有11.0.0.0网段接口,并且刚才也配置了,所以不用配了 •A •B •C •D • 告诉E,192.168.1.0在哪里
• 可以看到,PC1能连接E的两个端口了
• 最后,可以看到PC1成功连通PC2
• 我们可以看看路由器的路由表,以C为例
• 可以看到,我们没做任何配置,PC可以连通和它不同网段的接口,为什么? • 因为,192.168.2.1和192.168.1.1在同一个路由器上,它们是同一个路由器的
Cisco路由器静态路由配置实例
Cisco路由器静态路由配置实例初学路由器的配置,下面就用Boson NetSim for CCNP 6.1模拟软件进行配置…这篇文章主要是对路由表进行静态路由配置…拓扑结构图如下:下面开始:1.对Router1进行配置,配置命令如下:Router>enable进入特权模式Router#configure terminal 进入配置模式Enter configuration commands, one per line. End with CNTL/Z. Router(config)#interface ethernet0 进入E0端口模式Router(config-if)#ip address 192.168.1.1 255.255.255.0 配置IP地址Router(config-if)#no shutdown 激活该端口%LINK-3-UPDOWN: Interface Ethernet0, changed state to upRouter(config-if)#exit 返回上一级Router(config)#interface serial0 进入S0 端口模式Router(config-if)#ip address 192.168.2.1 255.255.255.0Router(config-if)#no shutdown%LINK-3-UPDOWN: Interface Serial0, changed state to up%LINK-3-UPDOWN: Interface Serial0, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to downRouter(config-if)#clock rate 6400 注意这里是设置时钟..如有不明白,可以打”?”.但是系统给的参数是 64000 .而我们要配置成 6400 ..可能是模拟软件的一个小BUG 吧!现在是在模拟软件中,如果是真实环境,我们要参照说明书..按照说明书来配置参数….Router(config-if)#exitRouter(config)#ip route 192.168.3.0 255.255.255.0 192.168.2.2 配置路由表Router(config)#end 返回特权模式Router#show ip route查看路由表Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaE1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate defaultU - per-user static routeGateway of last resort is not setC 192.168.1.0 is directly connected, Ethernet0S 192.168.3.0 [1/0] via 192.168.2.2C 192.168.2.0 is directly connected, Serial02. 对Router2进行配置,配置命令如下:Router>enableRouter#configure terminalEnter configuration commands, one per line. End with CNTL/Z. Router(config)#interface ethernet0Router(config-if)#ip address 192.168.3.1 255.255.255.0Router(config-if)#no shutdown%LINK-3-UPDOWN: Interface Ethernet0, changed state to upRouter(config-if)#exitRouter(config)#interface serial0Router(config-if)#ip address 192.168.2.2 255.255.255.0Router(config-if)#no shutdown%LINK-3-UPDOWN: Interface Serial0, changed state to up/////在这儿我们就不用设置时钟了,在相连的两个路由器接口中,只要一个接口配置时钟就可以了Router(config-if)#exitRouter(config)#ip route 192.168.1.0 255.255.255.0 192.168.2.1Router(config)#endRouter#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaE1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate defaultU - per-user static routeGateway of last resort is not setC 192.168.3.0 is directly connected, Ethernet0C 192.168.2.0 is directly connected, Serial0S 192.168.1.0 [1/0] via 192.168.2.13.对计算机的配置..IP地址和子网掩码还有网关上面的图上面的..测试:PC1 ping PC3C:>ping 192.168.3.2Pinging 192.168.3.2 with 32 bytes of data:Reply from 192.168.3.2: bytes=32 time=60ms TTL=241Reply from 192.168.3.2: bytes=32 time=60ms TTL=241Reply from 192.168.3.2: bytes=32 time=60ms TTL=241Reply from 192.168.3.2: bytes=32 time=60ms TTL=241Reply from 192.168.3.2: bytes=32 time=60ms TTL=241Ping statistics for 192.168.3.2: Packets: Sent = 5, Received = 5, Lost = 0 (0% loss),Approximate round trip times in milli-seconds:Minimum = 50ms, Maximum = 60ms, Average = 55ms 静态路由表的配置完成..初学者…有错误希望大家指出…..。
实验 2.8.1:基本静态路由配置
所有内容版权所有 © 1992–2007 Cisco Systems, Inc. 保留所有权利。本文档为 Cisco 公开信息。
第 1 页(共 19 页)
CCNA Exploration 路由协议和概念:静态路由
实验 2.8.1:基本静态路由配置
学习目标
完成本实验后,您将能够:
• 根据拓扑图进行网络布线。 • 清除启动配置并将路由器重新加载为默认状态。 • 在路由器上执行基本配置任务。 • 解释 debug ip routing 的输出。 • 配置并激活串行接口和以太网接口。 • 测试连通性。 • 收集信息并据此找出设备之间无法连通的原因。 • 使用中间地址配置静态路由。 • 使用送出接口配置静态路由。 • 比较使用中间地址的静态路由和使用送出接口的静态路由。 • 配置默认静态路由。 • 配置总结静态路由。 • 记录网络实施方案。
R1(config)#line console 0 R1(config-line)#exec-timeout 0 0 R1(config-line)#line vty 0 4 R1(config-line)#exec-timeout 0 0
任务 3:解释调试输出。 注意:如果您已在 R1 上配置了 IP 地址,请删除所有 interface 命令,然后再执行后续操作。在任务 2 结束时,我们所配置的 R1、R2 和 R3 上不能有任何接口配置。
is_up: 1 state: 4 sub state: 1 line: 1 has_route: False RT: add 172.16.3.0/24 via 0.0.0.0, connected metric [0/0] RT: NET-RED 172.16.3.0/24 RT: NET-RED queued, Queue size 1 RT: interface FastEthernet0/0 added to routing table %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up is_up: 1 state: 4 sub state: 1 line: 1 has_route: True %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, chan ged state to up is_up: 1 state: 4 sub state: 1 line: 1 has_route: True is_up: 1 state: 4 sub state: 1 line: 1 has_route: True
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
Cisco路由器静态路由配置实例
初学路由器的配置,下面就用Boson NetSim for CCNP 6.1模拟软件进行配置…这篇文章主要是对路由表进行静态路由配置…
拓扑结构图如下:
下面开始:
1.对Router1进行配置,配置命令如下:
Router>enable进入特权模式
Router#configure terminal 进入配置模式
Enter configuration commands, one per line. End with CNTL/Z. Router(config)#interface ethernet0 进入E0端口模式
Router(config-if)#ip address 192.168.1.1 255.255.255.0 配置IP地址Router(config-if)#no shutdown 激活该端口
%LINK-3-UPDOWN: Interface Ethernet0, changed state to up
Router(config-if)#exit 返回上一级
Router(config)#interface serial0 进入S0 端口模式
Router(config-if)#ip address 192.168.2.1 255.255.255.0
Router(config-if)#no shutdown
%LINK-3-UPDOWN: Interface Serial0, changed state to up
%LINK-3-UPDOWN: Interface Serial0, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to down
Router(config-if)#clock rate 6400 注意这里是设置时钟..如有不明白,可以打”?”.但是系统给的参数是 64000 .而我们要配置成 6400 ..可能是模拟软件的一个小BUG 吧!现在是在模拟软件中,如果是真实环境,我们要参照说
明书..按照说明书来配置参数….
Router(config-if)#exit
Router(config)#ip route 192.168.3.0 255.255.255.0 192.168.2.2 配置路由表
Router(config)#end 返回特权模式
Router#show ip route查看路由表
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default
U - per-user static route
Gateway of last resort is not set
C 192.168.1.0 is directly connected, Ethernet0
S 192.168.3.0 [1/0] via 192.168.2.2
C 192.168.2.0 is directly connected, Serial0
2. 对Router2进行配置,配置命令如下:
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z. Router(config)#interface ethernet0
Router(config-if)#ip address 192.168.3.1 255.255.255.0
Router(config-if)#no shutdown
%LINK-3-UPDOWN: Interface Ethernet0, changed state to up
Router(config-if)#exit
Router(config)#interface serial0
Router(config-if)#ip address 192.168.2.2 255.255.255.0
Router(config-if)#no shutdown
%LINK-3-UPDOWN: Interface Serial0, changed state to up
/////在这儿我们就不用设置时钟了,在相连的两个路由器接口中,只要一个接口配置时钟就可以了
Router(config-if)#exit
Router(config)#ip route 192.168.1.0 255.255.255.0 192.168.2.1
Router(config)#end
Router#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default
U - per-user static route
Gateway of last resort is not set
C 192.168.3.0 is directly connected, Ethernet0
C 192.168.2.0 is directly connected, Serial0
S 192.168.1.0 [1/0] via 192.168.2.1
3.对计算机的配置..
IP地址和子网掩码还有网关上面的图上面的..
测试:PC1 ping PC3
C:>ping 192.168.3.2
Pinging 192.168.3.2 with 32 bytes of data:
Reply from 192.168.3.2: bytes=32 time=60ms TTL=241
Reply from 192.168.3.2: bytes=32 time=60ms TTL=241
Reply from 192.168.3.2: bytes=32 time=60ms TTL=241
Reply from 192.168.3.2: bytes=32 time=60ms TTL=241
Reply from 192.168.3.2: bytes=32 time=60ms TTL=241
Ping statistics for 192.168.3.2: Packets: Sent = 5, Received = 5, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 50ms, Maximum = 60ms, Average = 55ms 静态路由表的配置完成..初学者…有错误希望大家指出…..。