思科路由的26个基本实验

合集下载

cisco路由器实验报告

cisco路由器实验报告

cisco路由器实验报告Cisco路由器实验报告引言:在现代网络通信中,路由器是一个至关重要的设备。

它能够将数据包从源地址传输到目的地址,实现网络之间的连接和数据传输。

本实验旨在研究和探索Cisco路由器的功能和应用。

一、Cisco路由器的基本原理Cisco路由器是一种网络设备,它基于OSPF(开放最短路径优先)协议和BGP (边界网关协议)等路由协议工作。

其基本原理是将数据包从一个网络传输到另一个网络,通过查找路由表中的最佳路径来实现。

二、Cisco路由器的配置与管理1. 登录和基本设置通过串口或以太网口与路由器建立连接后,可以通过命令行界面(CLI)或Web 界面登录路由器进行配置和管理。

首次登录需要进行基本设置,如设置主机名、密码、IP地址等。

2. 路由配置路由配置是Cisco路由器的核心功能之一。

通过配置静态路由或动态路由协议,路由器可以学习到网络拓扑,并根据路由表进行数据包转发。

静态路由适用于小型网络,而动态路由协议适用于大型网络。

3. 接口配置路由器的接口配置非常重要,它决定了路由器与其他设备之间的连接方式和速率。

可以通过配置IP地址、子网掩码、MTU(最大传输单元)等参数来进行接口配置。

4. 安全性配置为了保护网络安全,Cisco路由器提供了多种安全功能和配置选项。

例如,可以配置访问控制列表(ACL)来限制特定IP地址的访问,还可以启用SSH(安全外壳协议)来加密远程登录会话。

三、Cisco路由器的高级功能1. VLAN(虚拟局域网)通过配置VLAN,可以将一个物理网络划分为多个逻辑网络,提高网络的灵活性和安全性。

Cisco路由器支持VLAN的创建和管理,可以实现不同VLAN之间的通信。

2. VPN(虚拟专用网络)VPN是一种通过公共网络建立安全连接的技术。

Cisco路由器支持IPSec (Internet协议安全)和SSL(安全套接字层)等VPN协议,可以实现远程办公和跨地域网络连接。

思科路由部分11个实验项目

思科路由部分11个实验项目

思科路由部分11个实验项目:全程记录+讲解+知识点思科路由部分11个实验项目:全程记录+讲解+知识点实验基于Dynamips-0.2.6-Rc4 | unzip-c3620-i-mz.122-37.bin |unzip-c3640-js-mz.124-10 with NM-16ESW实验平台双Xeon 3.0 4G ECC 运行稳定后CPU 40%左右实验1:在P1范围内实现RIPv2实验2:在P1范围内实现基于RIPv2的等价负载均衡实验3:在P1范围内实现基于RIPv2的Key-Chain密钥实验实验4:在P2范围内实现IGRP的非等价负载均衡实验5:全区域中通过桢中继实现RIPv2路由协议 + 密钥验证实验6:全区域中实现EIGRP路由+FR+非等价负载均衡+验证实验7:OSPF基本配置[P1区域内配置]+DR/BDR考察实验8:单区域NBMA环境OSPF实现+验证实验9:多区域OSPF实现实验10:简单的路由重发布末节区域完全末节区域 NSSA区域 Virtual-Link实验11:被动接口路由更新过滤策略路由路由单项重发布以及AD/Metric更改路由双向重发布P1配置部分P1R1-P1R2192.168.1.1 - 192.168.1.2 /24 P1R1上配置Lo0 200.200.200.200 /24 P1R1-P1R3192.168.2.1 - 192.168.2.2 /24P1R3-P1R4192.168.3.1 - 192.168.3.2 /24P1R2-P1R4192.168.4.1 - 192.168.4.2 /24P1R1-BBR1 - 10.0.0.2 /8P1R2-BBR1 - 10.0.0.3 /8P2配置部分P2R1-P2R2172.16.1.1 - 172.16.1.2 /16 P2R1上配置Lo0 100.100.100.100 /8 P2R1-P2R3172.17.1.1 - 172.17.1.2 /16P2R3-P2R4172.18.1.1 - 172.18.1.2 /16P2R2-P2R4172.19.1.1 - 172.19.1.2 /16P2R1-BBR2 - 11.0.0.2 /8P2R2-BBR2 - 11.0.0.3 /8BBR配置部分BBR1-BBR2219.146.241.1 -219.146.241.2 /24BBR1 s0/0.1 -s0/0.210.0.0.1BBR2 s0/0.1 -s0/0.211.0.0.1BBR2-SW1219.146.242.1 - 219.146.242.2BBR1-SW2219.146.243.1 - 219.146.243.2SW1-SW2219.146.244.1 - 219.146.244.2SR配置部分SR1-SW1 101.0.0.1 - 101.0.0.2SR2-SW1 102.0.0.1 - 102.0.0.2SR3-SW2 103.0.0.1 - 103.0.0.2SR4-SW2 104.0.0.1 - 104.0.0.2SR1:lo0 105.0.0.1 Lo1 106.0.0.1SR2:lo0 107.0.0.1 Lo1 108.0.0.1实验1:在P1范围内实现RIPv2[P1R1]router ripver 2net 192.168.1.0net 192.168.2.0net 200.200.200.0[P1R2]router ripver 2net 192.168.1.0net 192.168.4.0[P1R3]router ripver 2net 192.168.2.0net 192.168.3.0[P1R4]router ripver 2net 192.168.3.0net 192.168.4.0验证结果,P1R1[Copy to clipboard]CODE:sh ip route:C 200.200.200.0/24 is directly connected, Loopback0R 192.168.4.0/24 [120/2] via 192.168.2.2, 00:00:22, FastEthernet0/0C 192.168.1.0/24 is directly connected, Serial1/1C 192.168.2.0/24 is directly connected, FastEthernet0/0R 192.168.3.0/24 [120/1] via 192.168.2.2, 00:00:22, FastEthernet0/0 注意:区分RIP两个版本,配置时候必须配置相同的rip version,虽然有办法让他们协同工作,但是基本上没什么意义RIPV1分类路由,没30秒发送一次更新分组,分组中不包含子网掩码信息,不支持 VLSM,默认进行边界自动路由汇总,且不可关闭,所以该路由不能支持非连续网络.不支持身份验证. 使用跳数作为度量,管理距离 120.每个分组中最多只能包含25个路由信息.使用广播进行路由更新.RIPV2无类路由,发送分组中含有子网掩码信息,支持VLSM,但默认该协议开启了自动汇总功能,所以如需向不同主类网络发送子网信息,需要手工关闭自动汇总功能(no auto-summary),RIPV2只支持将路由汇总至主类网络,无法将不同主类网络汇总,所以不支持CIDR.使用多播224.0.0.9进行路由更新,只有对应的多播MAC地址能够响应分组,在MAC层就能区分是否对分组响应.支持身份验证.分类路由选择协议,当发送路由分组的接口所处子网与分组相关的子网属于同一主类网络,那么路由器在该接口可以把具体的子网发送出去.路由器假设该接口与分组子网使用相同的子网掩码.什么是连续子网:属于同一主类网络,使用相同的子网掩码就是连续的子网.否则就是非连续子网.在接口上手工汇总命令:ip summary-address rip 被汇总子网被汇总子网掩码RIP 使用UDP(用户报文协议)520端口传输路由更新分组RIP只能做等价负载均衡实验2 在P1范围内实现基于RIPv2的等价负载均衡P1R1上的Lo0为200.200.200.200,作为此实验的目的IP[P1R4]int f0/0no ip route-cacheint s1/0no ip route-cacheaccess-list 101 permit ip icmp any 200.200.200.0 0.0.0.255debug ip pac 101验证结果[P1R2]router ripver 2net 192.168.1.0net 192.168.4.0[P1R3]router ripver 2net 192.168.2.0net 192.168.3.0[P1R4]router ripver 2net 192.168.3.0net 192.168.4.0P1R4上sh ip route,可以看到[Copy to clipboard]CODE:Gateway of last resort is not setR 200.200.200.0/24 [120/2] via 192.168.4.1, 00:00:16, FastEthernet0/0 [120/2] via 192.168.3.1, 00:00:09, Serial1/0C 192.168.4.0/24 is directly connected, FastEthernet0/0R 192.168.1.0/24 [120/1] via 192.168.4.1, 00:00:16, FastEthernet0/0 R 192.168.2.0/24 [120/1] via 192.168.3.1, 00:00:09, Serial1/0C 192.168.3.0/24 is directly connected, Serial1/0到达200.200.200.0网段的metric完全相同,并且通过两个出口P1R4#ping 200.200.200.200 re 2[Copy to clipboard]CODE:Type escape sequence to abort.Sending 2, 100-byte ICMP Echos to 200.200.200.200, timeout is 2 seconds:!!Success rate is 100 percent (2/2), round-trip min/avg/max = 12/14/16 msP1R4#16:00:24: IP: tableid=0, s=192.168.4.2 (local), d=200.200.200.200 (FastEthernet0/0), routed via RIB16:00:24: IP: s=192.168.4.2 (local), d=200.200.200.200 (FastEthernet0/0), len 100, sending16:00:24: IP: tableid=0, s=192.168.3.2 (local), d=200.200.200.200 (Serial1/0), routed via RIB16:00:24: IP: s=192.168.3.2 (local), d=200.200.200.200 (Serial1/0), len 100, sending注意1.route-cache是进程交换, ip route-cache是快速交换, ip route-cache optimum是最优交换, route-cache distributed是分布式最优,负载均衡需要切换为进程交换(根据分组处理,而不是目的地),7000以上系列需要no ip cef2.通过定义ACL定义过滤,然后debug抓取特定的数据包,可以最优化显示debug结果均衡负载的知识:均衡负载可以是基于目标地址或者是基于每个packet的所谓基于目标地址的均衡负载,是说假如有2条到达目标地址的路径,那么第一个packet将通过第一条链路到达第一个目标设备,第二个packet将通过第二条链路到达第二个目标设备,第三个packet又将通过第一条链路到达第三个目标设备等等,以次类推.当Cisco路由器工作在默认的交换模式,Fast Switching(快速交换)模式下,就使用这种类型的均衡负载 Fast Switching的工作原理是:当路由器对第一个packet进行发往目标地址的处理的时候,先查看路由表和选择出口接口,然后获取组成 frame的信息(比如ARP表的查询)并进行封装,然后传输.之前获取的这些路由和数据链路信息将被保存在快速交换的cache中.接下来,当有要到达和第一个包相同的目标地址的包的时候,就可以不进行路由表和ARP表的查询,直接对packet进行交换快速交换降低了CPU的占用和处理时间,并意味着去往某个目标地址的packet都从相同的路由器接口被路由出去.当有到达同一网络不同主机的packet,路由器可能会吧这些packet通过另外一条链路进行路由.因此,路由器能做的最好的就是给予目标地址的均衡负载所谓基于基于packet的均衡负载,是说假如有2条到达目标地址的路径,那么第一个packet将通过第一条链路到达目标设备,第二个packet将通过第二条链路到达目标设备,第三个packet又将通过第一条链路到达目标设备等等,以次类推.(这里考虑的是等价的均衡负载) Cisco路由器工作在Process Switching(进程交换)模式的时候就采用基于packet的均衡负载进程交换,是指每次对packet的交换,都要查询路由表,选择出口接口和查询数据链路信息,因为每次的路由决策都是独立的.要在某个接口打开进程交换模式,使用no ip route-cache命令.实验3 在P1范围内实现基于RIPv2的Key-Chain密钥实验 [P1R1]key chain ciscokey 1key-string mypasswordint f0/0ip rip auth key-chain ciscoip rip auth mode md 5int s1/1ip rip auth key-chain ciscoip rip auth mode md5验证结果在P1R1上定义密钥以后,分别在s1/1和f0/0上面启用,在其他路由器并没有启用相同的密钥的时候,通过debug ip rip eve查看:16:18:45: RIP: ignored v2 packet from 192.168.1.2 (invalid authentication)sh ip route查看R 192.168.3.0/24 is possibly down, routing via 192.168.2.2, FastEthernet0/0 说明因为密钥匹配原因,packet ignored,并且路由条目状态变化为possibly down在P1R2上定义同样密钥后debug 信息显示Page 5 of Cisco Tec! - Powered by Discuz! Board 31P1R4上sh ip route,可以看到16:31:16: RIP: received packet with MD5 authentication认证成功附加部分在P1R2上采用同样密钥,但是在接口上应用的时候如果采用明文方式 ip rip auth mod text(P1R1采用MD5加密)因为两边不匹配,则一样会invalid authentication注意可以在路由器上配置RIPv2消息认证包括:明文或MD5加密密码在钥匙链(key-chain)上定义多个秘钥(key)或密码,后者可选定义秘钥链名称:key chain test定义秘钥 key 1定义密码key-string cisco在接口上启用 int e0/0 ip rip authentication key-chain test定义发送方式 ip rip authtication mode md5记住,钥匙链-钥匙-钥匙的凹凸代表密码,必须在个锁(接口)上使用此钥匙(引用)sh ip pro可以查看version和keychain情况Default version control: send version 2, receive version 2 Interface Send Recv Triggered RIP Key-chain FastEthernet0/0 2 2 ciscoSerial1/1 2 2 ciscoLoopback0 2 2实验4 在P2范围内实现IGRP的非等价负载均衡等价负载均衡同RIP部分,设置上没什么特殊之处[P2R4]int f0/0bandwidth 10000no ip route-cacheint s1/0bandwidth 1000no ip route-cacherouter igrp 100vari 10access-list 101 permit ip icmp any 100.100.100.0 0.0.0.255debug ip pac 101验证结果使用sh int f0/0察看其默认BW为BW 100000 Kbit使用sh int s1/0察看其默认BW为BW 1544 Kbit但是奇怪的是,我还没有设置variance,且BW不同的情况下,基于Dynamips的metric计算值竟然相同,先不管它I 100.0.0.0/8 [100/8986] via 172.19.1.1, 00:00:09, FastEthernet0/0[100/8986] via 172.18.1.1, 00:00:18, Serial1/0如果只是设置了带宽,则所有的pac将从f0/0发出[Copy to clipboard]CODE:P2R4#ping 100.100.100.100 re 2Type escape sequence to abort.Sending 2, 100-byte ICMP Echos to 100.100.100.100, timeout is 2 seconds:!!Success rate is 100 percent (2/2), round-trip min/avg/max = 12/14/16 msP2R4#00:54:07: IP: tableid=0, s=172.19.1.2 (local), d=100.100.100.100 (FastEthernet0/0), routed via RIB00:54:07: IP: s=172.19.1.2 (local), d=100.100.100.100 (FastEthernet0/0), len 100, sending00:54:07: IP: tableid=0, s=172.19.1.2 (local), d=100.100.100.100 (FastEthernet0/0), routed via RIB00:54:07: IP: s=172.19.1.2 (local), d=100.100.100.100 (FastEthernet0/0), len 100,sending16:31:16: RIP: received packet with MD5 authentication认证成功附加部分在P1R2上采用同样密钥,但是在接口上应用的时候如果采用明文方式 ip rip auth mod text(P1R1采用MD5加密)因为两边不匹配,则一样会invalid authentication设置好variance以后,sh ip routeI 100.0.0.0/8 [100/8986] via 172.19.1.1, 00:01:09, FastEthernet0/0[100/12510] via 172.18.1.1, 00:00:16, Serial1/0两条路出来了,然后观察抓包即可[Copy to clipboard]CODE:P1R4#ping 100.100.100.100 re 2Type escape sequence to abort.Sending 2, 100-byte ICMP Echos to 100.100.100.100, timeout is 2 seconds:!!Success rate is 100 percent (2/2), round-trip min/avg/max = 12/14/16 msP1R4#00:58:24: IP: tableid=0, s=172.19.1.1 (local), d=100.100.100.100 (FastEthernet0/0), routed via RIB00:58:24: IP: s=172.19.1.1 (local), d=100.100.100.100 (FastEthernet0/0), len 100, sending00:58:24: IP: tableid=0, s=172.18.1.1 (local), d=100.100.100.100 (Serial1/0), routed via RIB00:58:24: IP: s=172.18.1.1 (local), d=100.100.100.100 (Serial1/0), len 100, sending注意:设置BW中的两个错误1.将两个BW值一个500000 一个1500,设置variance 为 334,5000000/1500=333,但是经过实验,variance设置范围为1-1282.设置BW值不适当的时候,可能会导致sh ip route显示possiblydown,这个时候重新启用IGRP即可知识点:IP协议出现最早,最大跳数只支持15跳,只适合小型网络;IGRP是Cisco公司为了弥补RIP的缺陷而开发设计,适合更大的网络,最大支持255跳,为了减轻网络的负担,将默认的更新周期从RIP的30秒改为90秒,但是这也造成了网络拓扑变化时收敛速度变迟缓了。

思科CISCO实验记录一:路由器基本配置原理与命令小结

思科CISCO实验记录一:路由器基本配置原理与命令小结

思科CISCO实验记录⼀:路由器基本配置原理与命令⼩结本⽂讲述了思科CISCO实验中的路由器基本配置原理与命令。

分享给⼤家供⼤家参考,具体如下:⼀、路由器基本配置要求1、设置路由器名为:hehe2、设置特权模式下password为ccna,secret为ccnp,vty线路密码为ccie3、所有明⽂密码都加密⼆、路由器基本配置命令1、设置路由器名为:heheRouter#configure terminal //进⼊配置模式Enter configuration commands, one per line. End with CNTL/Z.Router(config)#hostname hehe //设置hostnamehehe(config)#2、设置特权模式下password为ccna,secret为ccnp,vty线路密码为cciehehe#configure terminalEnter configuration commands, one per line. End with CNTL/Z.hehe(config)#enable password ccna //特权模式的password密码hehe(config)#enable secret ccnp //特权模式的secret密码hehe(config)#line vty 0 4 //启⽤0-4号5个vtyhehe(config-line)#password ccie //登录的passwordhehe(config-line)#login //启⽤密码验证,no login关闭密码验证3、所有明⽂密码都加密hehe(config)#service password-encryption三、路由器基本配置解析1、新设备如何连接新到的路由器可以通过console⼝与电脑连接,默认波特率为9600即可⾃动与设备连接2、password、secretpassword是早期设备的密码协议,默认是明⽂保存的secret是最常⽤的密码⽅式,是MD5加密的3、vtyvty⽀持多种协议,常见的有ssh、telnet等,默认telnet协议。

Cisco路由器配置实例(经典)

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。

cisco路由器实验报告

cisco路由器实验报告

cisco路由器实验报告
《cisco路由器实验报告》
在网络通信领域,路由器是一种非常重要的设备,它可以实现不同网络之间的
数据传输和转发。

而cisco路由器作为全球领先的网络设备制造商,其产品在
市场上有着很高的知名度和影响力。

为了更好地了解和掌握cisco路由器的使
用和性能,我们进行了一系列的实验,并在此进行报告。

首先,我们对cisco路由器进行了基本的配置和连接,包括设置IP地址、子网
掩码、网关等基本网络参数。

在这一步骤中,我们深入了解了cisco路由器的
操作界面和命令行配置方式,对其操作和管理有了更深刻的认识。

其次,我们进行了路由器之间的互联实验,通过配置路由器之间的静态路由和
动态路由协议(如OSPF、EIGRP等),实现了不同网络之间的数据传输和转发。

在这个实验中,我们深入了解了cisco路由器的路由选择算法和路由表的构建
过程,对网络的数据传输和转发有了更深入的了解。

除此之外,我们还进行了一些高级功能的实验,如ACL(访问控制列表)的配
置和应用、NAT(网络地址转换)的配置和应用等。

这些实验让我们更加深入
地了解了cisco路由器在网络安全和地址转换方面的应用。

总的来说,通过这些实验,我们对cisco路由器的使用和性能有了更深入的了解,对网络通信的原理和技术有了更深刻的认识。

希望通过这份实验报告,可
以为更多对cisco路由器感兴趣的人提供一些参考和帮助。

同时,也希望cisco
路由器在未来的发展中能够更加完善和强大,为网络通信领域带来更多的创新
和进步。

思科基础实验(中英文对照)CCNA,CCNP实验

思科基础实验(中英文对照)CCNA,CCNP实验

目录实验一路由器基本配置 (1)实验二静态路由 (3)实验三缺省路由 (5)实验四静态路由&缺省路由&CDP协议 (7)实验五三层交换机实现VLAN间通信 (9)实验六Vtp (11)实验七生成树STP (13)实验八RIP路由协议1 (17)实验九RIP路由协议2 (19)实验十OSPF单区域1 (21)实验十一OSPF单区域2 (22)实验十二OSPF单区域3 (24)实验十三EIGRP (26)实验十四ACL标准访问控制列表 (29)实验十五扩展ACL -1 (31)实验十六扩展ACL -2 (33)实验十七专家级访问控制列表 (36)实验十八动态NAT (37)实验十九NAT地址转换 (39)实验二十单臂路由 (41)实验二十一PPP chap认证 (43)实验二十二研究应用层和传输层协议 (44)实验二十三检查路由 (45)实验二十四研究ICMP 数据包 (47)实验二十五研究第2 层帧头 (49)实验二十六地址解析协议(ARP) (50)实验二十七中间设备用作终端设备 (52)实验二十八管理设备配置 (54)实验一路由器基本配置一、实验设备一台路由器,一台PC,配置线一条。

二、实验要求1.更改路由器名称为RA2.设置password为cisco1,secret为cisco2,vty为cisco3,并要求所有密码都加密。

3.关闭域名查找,命令输入同步。

4.配置以太网口的IP为202.119.249.2195.设置登陆提示信息6.对串行口进行描述(描述信息为:welcome to lixin lab)7.将上述信息保存到tftp server8.将实验过程配置写在记事本中进行粘贴。

9.配置VTY访问权限。

10.禁止路由器进行域名解析。

三、实验步骤Router>enableRouter#configure terminalRouter(config)#hostname RA 设置路由器名RA(config)#enable password cisco1 设置密码RA(config)#enable secret cisco2 设置加密密码RA (config)#no ip domain-lookup关闭域名查找(当我们打错命令时,不会去查找DNS,造成延时)RA (config)#line console 0RA (config-line)#logging synchronous命令输入达到同步(信息提示不会打断你的输入)RA (config-line)#exec-timeout 0 0 设置永久不超时RA (config-line)#exitRA(config)#line vty 0 4RA(config-line)#(enable)password cisco3 设置vty密码RA(config-line)#exitRA(config)#service password-encryption 对密码加密RA(config)#int fastEthernet 0/0RA(config-if)#ip address 202.119.249.1 255.255.255.0 对以太网口fa0/0配置IP RA(config-if)#no shutdown 开启端口RA(config-if)#exitRA(config)#banner motd & welcome welcome to ccna lab & 设置登陆提示信息RA(config)#int fa0/1RA(config-if)#description this is a fast port 描述端口信息RA(config-if)#exitRA(config)#copy running-config tftp 把信息保存到tftp实验二静态路由一、实验设备两台28系列型号路由器通过串口相连。

Cisco26xx 系列路由器配置基础实验

Cisco26xx 系列路由器配置基础实验

南京信息工程大学实验(实习)报告实验(实习)名称Cisco 系列路由器配置基础实验(实习)日期 12.11.22 得分指导教师刘生计算机专业网络工程年级大三班次 1 班姓名学号一、实验目的(1)掌握Cisco 26XX系列路由器网间网操作系统软件IOS(Internetwork Operating System)的应用;(2)理解Cisco 26XX系列路由器(5种)基本配置方法;(3)掌握Cisco 26XX系列路由器用户命令状态,特权命令状态,全局设置状态,局部设置状态,设置对话状态;(4)掌握Cisco 26XX系列路由器常用命令:任务命令,显示命令,拷贝命令,网络命令,(5)掌握Cisco 26XX系列路由器相关(全局,局部,…….)参数配置方法;二、实验准备阅读本实验的内容及操作步骤;参考资料:CCNA实验指南; CCNA2.0中文版教材;三、实验内容使用模拟软件“Packet Tracer5.0”进行。

四、实验步骤(1)在Packet Tracer5.0中绘制拓扑结构图(2)配置基本参数。

五、实验结果(1)选择pc0、pc1配置基本参数(2)选择R0.输入以下命令:Route> enableRoute# conf t(切换到配置状态)Route# hostname R0R0(config)#int Fa0/0(配置快速Ethernet 0端口)R0(config-if)#ip add 192.168.1.1 255.255.255.0(定义以太网IP地址,子网掩码表示为C类网络默认子网掩码)R0(config-if)#no shut(激活端口)R0(config-if)#int se2/0(配置Serial 0口)R0(config-if)#ip add 202.98.0.1 255.255.255.252(定义互联广域网IP地址)R0(config-if)#clock rate 64000R0(config-if)#no shut(激活端口)R0(config)#ip route 192.168.2.0 255.255.255.0 202.98.0.2(定义静态路由,通过网关到达对端局域网络,IP为对端广域网IP地址)R0(config)#endR0#copy run start(保存配置)R0#show ip route(3)选择R1.输入以下命令:Route> enableRoute# conf t(切换到配置状态)Route# hostname R1R1(config)#int Fa0/0(配置快速Ethernet 0端口)R1(config-if)#ip add 192.168.2.1 255.255.255.0(定义以太网IP地址,子网掩码表示为C类网络)R1(config-if)#no shut(激活端口)R1(config-if)#int se2/0(配置Serial 0口)R1(config-if)#ip add 202.98.0.2 255.255.255.252(定义互联广域网IP地址)R1(config-if)#no shut(激活端口)R1(config)#ip route 192.168.1.0 255.255.255.0 202.98.0.1(定义静态路由,通过网关到达对端局域网络,IP为对端广域网IP地址)R1(config)#endR1#copy run start(保存配置)R1#show ip route(4)选择PC0.输入以下命令:Ping 192.168.2.2Tracert 192.168.2.2查看运行结果六、实验总结通过这次实验,由于要对路由器进行配置,所以必须小心谨慎,一个不留神就会敲错代码,导致错误,需退回上一级,重新进入。

思科路由器ospf实验手册

思科路由器ospf实验手册

实验目的:1)理解ospf的区域分层设计2)Ospf的配置3)Router-id的选择过程4)Ospf的dr和dbr选举配置5)Ospf的路由查看,邻居关系查看基本配置:R1:interface FastEthernet0/0ip address 10.1.1.1 255.255.255.0router ospf 1//1是进程号,是区分不同的ospf进程的,本地意义,不同的路由器可以可配置不同的号码network 10.1.1.1 0.0.0.0 area 0//0.0.0.0 表示精确的发布这个接口R2:interface Loopback0ip address 2.2.2.2 255.255.255.0!interface FastEthernet0/0ip address 10.1.1.2 255.255.255.0router ospf 1network 2.2.2.2 0.0.0.0 area 0network 10.1.1.2 0.0.0.0 area 0R3:interface Loopback0ip address 3.3.3.3 255.255.255.0!interface FastEthernet0/0ip address 10.1.1.3 255.255.255.0router ospf 1network 3.3.3.0 0.0.0.255 area 0network 10.1.1.0 0.0.0.255 area 0//0.0.0.255,表示发布的x.x.x.a,a表示任何子网地址,只要在这个子网地址范围内,都将被发布出去,本实验中是没有意义的,主类网段都不一样R4:(abr,area border router)interface Loopback0ip address 4.4.4.4 255.255.255.0!interface FastEthernet0/0ip address 10.1.1.4 255.255.255.0interface Serial1/0ip address 20.1.1.4 255.255.255.0network 4.4.4.4 0.0.0.0 area 0network 10.1.1.4 0.0.0.0 area 0network 20.1.1.4 0.0.0.0 area 1//因为r4是abr(区域边界路由器),不同的接口应该划在不同的区域中R5:interface Loopback0ip address 5.5.5.5 255.255.255.0ip ospf 1 area 1 前面的1是进程号,后面的1是区域号//是ospf另外一种发布接口的方法interface Serial1/0ip address 20.1.1.5 255.255.255.0ip ospf 1 area 1router ospf 1可以在r4上看一下ospf的邻居关系R4上应该有4个邻居关系Show ip ospf neighborrouter-idRouter-id 的作用?1. 标识路由器,用router-id来区分不同的路由器的链路状态数据库2. 类似于人的名字(身份证号码)3. Router-id如果规划好了,对路由器的识别就很容易。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

cisconet 实验一修改cisco 路由器的名称及路由器密码命令操作实验要求:1. 路由器名:cisconet2. 设置password为cisconet,secret为cisconet,vty为cisconet,3. 并要求所有密码都加密。

实验过程:cisconet> enablecisconet# configure terminalcisconet(config)#hostname cisconet 设置路由器名cisconet(config)# enable password cisconet 设置passwordcisconet(config)# enable secret cisconet 设置secretcisconet(config)# line vty 0 4cisconet(config-line)#login 要求密码验证cisconet(config-line)#password cisconet 设置vty密码cisconet(config-line)#exit 退出线路配置模式cisconet(config)#service password-encryption 对密码加密cisconet 实验二配置路由器端口ip地址/标识及保存当前的配置操作实验要求:1:在路由器的端口下配置ip地址 202.119.249.219掩码 255.255.255.02:配置路由器提示信息 welcome to cisconet cisconet lab3:配置路由器接口提示信息 this is a serial port4:保存当前的配置cisconet>enablecisconet# configure terminalcisconet(config)# interface fastethernet 0/0 cisconet(config-if)# ip address 202.119.249.219 255.255.255.0对以太网口fa0/0配置IPcisconetkeji(config-if)# no shutdown 开启端口cisconet(config-if)exitcisconet(config)#banner motd “cisconet(config)#welcome to cisconet cisconet lab”提示信息以上几部是设置登陆提示信息cisconet(config)# interface serial 0cisconet(config-if)# description this is a serial port 端口描述信息cisconet(config-if)#endcisconet#copy running-config startup-config 对配置进行保存cisconet 实验三CDP命令操作实验要求:1. 路由器名:cisconet1、 cisconet2、 cisconet3.2. 设置password为cisconet,secret为cisconet,vty为cisconet,,并要求所有密码都加密.3. 配置各路由器.实验过程:配置路由器1router(config)#hostname cisconet1 设置路由器名cisconet1(config)enable password cisconet 设置passwordcisconet1(config)enable secret cisconet 设置secretcisconet1(config)line vty 0 4cisconet1(config-line)#login 要求密码验证cisconet1(config-line)#password cisconet 设置vty密码cisconet1(config-line)endcisconet1(config)#service password-encryption 对密码加密cisconet1(config)#interface serial 0cisconet1(config-if)#ip address 202.119.249.1 255.255.255.0 设置s0的IP地址和子网掩码cisconet1(config-if)#clock rate 56000 设置时钟频率cisconet1(config-if)#no shutdown 开启端口路由器2和路由器3的配置和路由器1类似,只是各接口的IP地址设置不同,同时要在路由器3的serial 1接口上配置时钟频率,而路由器2的两个接口上不需配置时钟.在路由器2上操作:cisconet2#show cdp 显示CDP信息cisconet2#show cdp neighbors 显示相连的CDP邻居汇总信息cisconet2#show cdp neighbor detail 显示相连的CDP邻居详细信息cisconet2#show cdp traffic 显示CDP所用的数据包的信息cisconet2#show cdp entry * 显示所有相邻路由器的所有信息cisconet2#show cdp entry cisconet1(路由器名) 显示特定邻居(cisconet1)的详细信息cisconet 实验四环回接口的使用和创建实验要求:1.路由器名为cisconet,通过路由器的CONSOLE口直接用反线与PC上的COM口相连;2.在路由器上将密码设置为cisconet后,保存配置;3.重新启动路由器将密码破解.实验过程:在cisconet上的配置:router(config)#hostname cisconet 将路由器名设置为cisconetcisconet(config)#enable secret cisconet 设置路由器的特权密码cisconet(config)exitcisconet#copy running-config startup-config 保存配置cisconet#reload 重新启动路由器重新启动是按键盘的CTRL+BREAK键,进入ROMMON模式> o/r 0x2142 更改寄存器的值,使路由器启动后直接进入会话模式 > i 重新启动路由器路由器启动直接进入会话模式后,不进行任何配置,进入IOSrouter#copy startup-config running-config 将配置载入到RAM中cisconet#configure terminalcisconet(config)#no enable secret 删除密码cisconet(config)exitcisconet#copy running-config startup-config 保存配置重新启动再进入特权模式就不再需要密码了cisconet 实验五配置TELNET远程登陆实验要求:1.路由器命名为cisconet1和cisconet2;2.在cisconet2上设置特权密码和VTY 密码;3.从cisconet1上TELNET到cisconet2;4.在cisconet2上查看已经TELNET到本设备上的其它用户。

实验过程:Cisconet2上的配置Cisconet2(cinfig)#password secret cisconet 设置特权密码Cisconet2(cinfig)#line vty 0 4 进入线路配置模式Cisconet2(cinfig-line)#password cisconet 设置VTY密码Cisconet2(cinfig-line)#login 要求进行密码验证Cisconet2(cinfig-line)#exitCisconet2(cinfig)#interface serial 0Cisconet2(cinfig-if)#ip address 192.168.1.1 255.255.255.0 配置IP地址Cisconet2(cinfig-if)#clock rate 72000 配置时钟频率Cisconet2(cinfig-if)#no shutdown 启用接口Cisconet1上的配置Cisconet1(cinfig)#interface serial 0Cisconet1(cinfig-if)#ip address 192.168.1.2 255.255.255.0 配置IP地址Cisconet1(cinfig-if)#no shutdown 启用接口配置完成后就可以从cisconet1上TELNET到cisconet2对其进行控制管理.Cisconet1(cinfig) #telnet 192.168.1.1 远程TELNET到cisconet2 登陆到cisconet2时按要求输入VTY密码和特权密码后完全登陆成功,在cisconet2上使用show users 命令查看telnet到本设备的用户。

cisconet 实验六环回接口的使用和创建实验要求:1.路由器名为cisconet1和cisconet2;2.在每个路由器上创建一个环回接口,并给其分配IP地址;3.删除环回口实验过程:1.环回接口是路由器上的一个逻辑、虚拟接口。

路由器上默认没有任何环回接口,但可以创建,正常情况下路由器的接口不像交换机那么多,有时在做某些实验时,比如在上面的拓扑图上两个PC在做某些实验时可以通过创建两个loopback(环回)接口来代替。

loopback接口在路由器上与物理接口一样对待,可以给他们分配寻址信息。

loopback接口使用广泛,因为该接口默认是起用的,除非用shutdown命令关闭.2.创建环回接口cisconet1#configure terminal 进入全局配置模式cisconet1(config)#interface loopback 0 创建loopback 0并进入接口配置模式cisconet1(config-if)#ip address 172.16.1.1 255.255.255.0 给环回口分配IP地址cisconet1(config-if)#endcisconet1#show interface loopback 0 查看环回口信息cisconet1#configure terminalcisconet1(config)#no interface loopback 0 删除环回口cisconet 实验七静态路由和默认路由的配置实验要求:1.设置路由器名为cisconet1、cisconet2、cisconet3;2.在路由器cisconet1和cisconet3上配置默认路由;3.在cisconet2上配置静态路由;4.设置PC的IP地址和默认网关.Router(config)#hostname cisconet1 设置路由器名Cisconet1(config)#interface ethernet 0 进入e0端口Cisconet1 (config-if)#ip address 172.16.3.1 255.255.255.0 添加e0口的IP Cisconet1 (config-if)#no shutdown 打开e0口Cisconet1 (config-if)#exitCisconet1 (config)#interface serial 0 进入s0端口Cisconet1 (config-if)#ip address 172.16.1.1 255.255.255.0 添加s0口的IP Cisconet1 (config-if)#clock rate 56000 设置时钟Cisconet1 (config-if)#no shutdown 打开s0口Cisconet1 (config-if)#exitCisconet1 (config)#ip route 0.0.0.0 0.0.0.0 172.16.1.2 添加缺省路由Router(config)#hostname cisconet2 设置路由器名cisconet2 (config)#interface serial 0 进入s0端口cisconet2 (config-if)#ip address 172.16.2.1 255.255.255.0 添加s0口的IP cisconet2 (config-if)#no shutdown 打开s0口cisconet2 (config-if)#exitcisconet2 (config)#interface serial 1 进入s1端口cisconet2 (config-if)#ip address 172.16.1.2 255.255.255.0 添加s1口的IP cisconet2 (config-if)#no shutdown 打开s1口tcisconet2 (config-if)#exitcisconet2 (config)#ip route 172.16.3.0 255.255.255.0 172.16.1.1 添加静态路由cisconet2 (config)#ip route 172.16.5.0 255.255.255.0 172.16.2.2 添加静态路由Router(config)#hostbane cisconet3cisconet3 (config)#interface ethernet 0 进入e0端口cisconet3 (config-if)#ip address 172.16.4.1 255.255.255.0 添加e0口的IP cisconet3 (config-if)#no shutdown 打开e0口cisconet3 (config-if)#exitcisconet3 (config)#interface serial 1 进入s1端口cisconet3 (config-if)#ip address 172.16.2.2 255.255.255.0 添加s1口的IP cisconet3 (config-if)#no shutdown 打开s1口tcisconet3 (config-if)#exitcisconet3 (config)#ip route 0.0.0.0 0.0.0.0 172.16.2.1 添加缺省路由PC 上的配置为:PC1:IP为172.16.3.2 网关:172.16.3.1PC2:IP为172.16.4.2 网关:172.16.4.1cisconet 实验八RIP动态路由的配置实验要求:1.路由器名为cisconet1、 cisconet2;2.cisconet1与PC1相连,cisconet2与PC2相连,cisconet1的so口与jiande2的so口相连;3.各接口的IP地址如拓扑图所示,cisconet1为DCE,cisconet2为DTE;4.在两路由器上起用RIP协议;5.查看路由表并验证各网段之间的连通性.实验过程:1.按拓扑图的需要配置各路由器端口的IP地址,用no shutdown命令起用各端口;2.在cisconet1的S0端口使用clock rate 64000命令配置时钟频率;3.配置各PC的ip地址和默认网关;4.在两路由器上使用show ip route命令查看路由表,只能看到与该路由器直连的网段;5.起用RIP协议并将各网段加入路由进程在cisconet1上:cisconet1(config-router)#router rip 起用路由协议cisconet1(config-router)#network 192.168.1.0 将192.168.1.0/24网段加入路由进程cisconet1(config-router)#network 192.168.2.0 将192.168.2.0/24网段加入路由进程cisconet1(config-router)#endcisconet1#show ip route 查看路由表在cisconet2上 cisconet1(config-router)#router rip 起用路由协议cisconet1(config-router)#network 192.168.1.0 将192.168.1.0/24网段加入路由进程cisconet1(config-router)#network 192.168.3.0 将192.168.3.0/24网段加入路由进程cisconet1(config-router)#endcisconet1#show ip route 查看路由表配置RIP协议后,路由表中可以看到通过RIP协议学习到的非直连的网段的路由条目,在PC1上使用PING 192.168.3.2测试到PC2的连通性,测试成功。

相关文档
最新文档