ciscoIP路由分解实验
- 格式:docx
- 大小:13.12 KB
- 文档页数:8
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协议,可以实现远程办公和跨地域网络连接。
c i s c o I P路由分解实验1.在路由表中查找特定的路由条目Known via "ospf 55", distance 110, metric 11, type inter areaRedistributing via ospf 55Routing Descriptor Blocks:Route metric is 11, traffic share count is 1% Network not in table注意的是这里都是无类路由,如果有类的就不一样了2.在路由表中查找相同类型的路由条目Router>show ip route staticsubnetted, 1 subnetsS还有一个更有用的命令Router>show ip route summaryIP routing table name is Default-IP-Routing-Table(0)Route Source Networks Subnets Overhead Memory (bytes)connected 0 3 328 432static 1 0 64 144ospf55 1 3 256 576Intra-area: 1 Inter-area: 2 External-1: 1 External-2: 0NSSA External-1: 0 NSSA External-2: 0internal 2 2328Total 4 6 648 3480注释通过显示路由表的统计情况来了解当前路由器的路由条目,也可以用来以后的比对3.配置静态路由Router#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Router(config)#endRouter#也可以给路由条目打上标签Router#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Router(config)#endRouter#注释在类似以太网这种多路访问的网络中建议使用下一跳为地址而不是接口。
实训报告实训一路由基本配置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路由器进行了基本的配置和连接,包括设置IP地址、子网
掩码、网关等基本网络参数。
在这一步骤中,我们深入了解了cisco路由器的
操作界面和命令行配置方式,对其操作和管理有了更深刻的认识。
其次,我们进行了路由器之间的互联实验,通过配置路由器之间的静态路由和
动态路由协议(如OSPF、EIGRP等),实现了不同网络之间的数据传输和转发。
在这个实验中,我们深入了解了cisco路由器的路由选择算法和路由表的构建
过程,对网络的数据传输和转发有了更深入的了解。
除此之外,我们还进行了一些高级功能的实验,如ACL(访问控制列表)的配
置和应用、NAT(网络地址转换)的配置和应用等。
这些实验让我们更加深入
地了解了cisco路由器在网络安全和地址转换方面的应用。
总的来说,通过这些实验,我们对cisco路由器的使用和性能有了更深入的了解,对网络通信的原理和技术有了更深刻的认识。
希望通过这份实验报告,可
以为更多对cisco路由器感兴趣的人提供一些参考和帮助。
同时,也希望cisco
路由器在未来的发展中能够更加完善和强大,为网络通信领域带来更多的创新
和进步。
I P路由分解实验Document serial number【KK89K-LLS98YT-SS8CB-SSUT-SST108】c i s c o I P路由分解实验1.在路由表中查找特定的路由条目Known via "ospf 55", distance 110, metric 11, type inter areaRedistributing via ospf 55Routing Descriptor Blocks:Route metric is 11, traffic share count is 1% Network not in table注意的是这里都是无类路由,如果有类的就不一样了2.在路由表中查找相同类型的路由条目Router>show ip route staticsubnetted, 1 subnetsS还有一个更有用的命令Router>show ip route summaryIP routing table name is Default-IP-Routing-Table(0)Route Source Networks Subnets Overhead Memory (bytes)connected 0 3 328 432static 1 0 64 144ospf55 1 3 256 576Intra-area: 1 Inter-area: 2 External-1: 1 External-2: 0NSSA External-1: 0 NSSA External-2: 0internal 2 2328Total 4 6 648 3480注释通过显示路由表的统计情况来了解当前路由器的路由条目,也可以用来以后的比对3.配置静态路由Router#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Router(config)#endRouter#也可以给路由条目打上标签Router#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Router(config)#endRouter#注释在类似以太网这种多路访问的网络中建议使用下一跳为地址而不是接口。
一、拓扑图Router1 F0/0 <----> Switch5 F0/0Router1 E1/0 <----> VPCS V0/5Switch5 F0/1 <----> Switch1 F0/0Switch5 F0/2 <----> Switch2 F0/0Switch5 F0/3 <----> Switch3 F0/0Switch5 F0/4 <----> Switch4 F0/0Switch1 F0/1 <----> VPCS V0/1Switch2 F0/1 <----> VPCS V0/2Switch3 F0/1 <----> VPCS V0/3二、dhcp服务器就是通过主机分配ip的一项服务。
路由是通过那个口来分配的。
接几个分配几个。
要使客户机能从用作DHCP Server的路由器中自动获得IP地址。
三、实验要求:1、vlan之间的通信通过三层交换机来实现2、路由器为4个vlan来分配ip地址3、pc1 - 4分别属于4个部门,能够自动得到ip地址4、pc1 - 5直接可以ping通四、实验思路:1、首先配置二层交换机上的vlan、trunk并把接口加入vlan2、三层交换中配置vlan、trunk并启用ip routing路由功能3、三层交换中配置vlan ip地址,三层交换机是带有三层路由功能的交换机,也就是这台交换机的端口既有三层路由功能,也具有二层交换功能。
三层交换机端口默认为二层口,如果需要启用三层功能就需要在此端口输入no switchport命令。
运行router rip协议(其他协议也行)查看路由表 show ip router4、配置路由器dhcp服务建立地址持ip dhcp pool apple(apple为地址池名称可以随便起)运行router rip协议5、保存设置:在全局配置模式下 Router#copy running-config startup-config //保存当前的配置或 Router#write 也行6、查看!五、实验过程:1、配置二层交换机valn trunk 并将接口加入vlansw1#vlan datasw1#vlan databasesw1(vlan)#vlan 10VLAN 10 added:Name: VLAN0010sw1(vlan)#exitAPPLY completed.Exiting....sw1#conf tEnter configuration commansw1(config)#interface f0/0sw1(config-if)#sw m tsw1(config-if)#interface f0/1sw1(config-if)#sw ac vlan 10sw1(config-if)#exitsw1(config)#exitsw1#show vlan-switchsw2 - 4相同配置2、配置三层交换(vlan、trunk、vlan ip)sw3-1#vlan dasw3-1(vlan)#vlan 10VLAN 10 added:Name: VLAN0010sw3-1(vlan)#vlan 20VLAN 20 added:Name: VLAN0020sw3-1(vlan)#vlan 30VLAN 30 added:Name: VLAN0030sw3-1(vlan)#vlan 40VLAN 40 added:Name: VLAN0040sw3-1(config)#ip routing 在三层交换中启动路由功能sw3-1(config)#interface vlan 10sw3-1(config-if)#ip ad 192.168.1.1 255.255.255.0 配置vlan ip sw3-1(config-if)#no shutsw3-1(config-if)#exitsw3-1(config)#interface vlan 20sw3-1(config-if)#ip ad 192.168.2.1 255.255.255.0sw3-1(config-if)#no shutsw3-1(config-if)#exitsw3-1(config)#interface vlan 30sw3-1(config-if)#ip address 192.168.3.1 255.255.255.0sw3-1(config-if)#no shutsw3-1(config-if)#interface vlan 40sw3-1(config-if)#ip ad 192.168.4.1 255.255.255.0sw3-1(config-if)#no shutsw3-1(config-if)#exitsw3-1(config)#interface rang f0/1 - 4 配置trunksw3-1(config-if-range)#sw m tsw3-1(config-if-range)#exitsw3-1(config)#interface f0/0sw3-1(config-if)#no switchport 启动三层接口sw3-1(config)#interface f0/0sw3-1(config-if)#ip address 10.0.0.1 255.0.0.0 配置接口ip sw3-1(config-if)#no shutsw3-1(config)#ip route 0.0.0.0 0.0.0.0 10.0.0.3 配置默认路由sw3-1(config)#router rip 启用rip协议sw3-1(config-router)#network 192.168.1.0sw3-1(config-router)#network 192.168.2.0sw3-1(config-router)#network 192.168.3.0sw3-1(config-router)#network 192.168.4.0sw3-1(config-router)#network 10.0.0.0查看路由表3、配置dhcp路由器dhcp(config)#interface f0/0dhcp(config-if)#ip addressdhcp(config-if)#ip address 10.0.0.3 255.0.0.0dhcp(config-if)#interface 192.168.237.1 255.255.255.0 dhcp(config)#inte e1/0dhcp(config-if)#ip add 192.168.237.1 255.255.255.0 dhcp(config-if)#no shutdhcp(config-if)#exitdhcp(config)#router ripdhcp(config-router)#network 10.0.0.0dhcp(config-router)#network 192.168.237.0show ip route 同上dhcp(config)#ip dhcp pool apple 建立地址池dhcp(dhcp-config)#network 192.168.0.0 255.255.0.04、在三层交换指定dhcp服务器即路由器的ip 地址。
精品文档精品文档实验1 路由器基础命令回顾一、实验目的通过本节的练习回顾、熟悉一期课程中涉及到的路由器的相关指令。
掌握路由器的基础配置。
二、实验需要的知识点一期路由器的基础知识。
三、实验步骤1、改写主机名。
把路由器的主机名改成:RouterA.。
在全局模式下使用指令的关键字:hostname name2、配置密码。
进入特权模式的密码为cisco。
配置控制台的密码:cisco配置远程登录的密码:cisco在全局模式下使用指令的关键字:enable password password在全局模式下使用指令的关键字:line vty 0 4loginpassword password在全局模式下使用指令的关键字:line console 0loginpassword password3、配置时钟。
在全局模式下使用指令的关键字:clock set hh::mm::ss mm:dd:yy4、配置接口ip地址。
在路由器的环回接口配置ip地址:1.1.1.1/24。
在e0接口上配置ip地址:192.1.1.1/24在全局模式下使用指令的关键字:interface interface在接口模式下使用指令的关键字:ip address ip address mask5、退出,有三种方法。
endexitlogout6、保存配置,有两种方法。
copy running-config stratup-configwrite7、停止域名解析查询。
在全局模式下使用指令的关键字:no ip domain lookup四、检测在特权模式下使用:show version2、在特权模式下使用:show interface {interface}。
思科Cisco路由器RIP动态路由配置实验案例详解本⽂讲述了思科Cisco路由器RIP动态路由配置实验。
分享给⼤家供⼤家参考,具体如下:实验九 路由器RIP动态路由配置⼀、实验⽬的1. 掌握RIP协议的配置⽅法:2. 掌握查看通过动态路由协议RIP学习产⽣的路由;3. 熟悉⼴域⽹线缆的链接⽅式;⼆、实验背景 假设校园⽹通过⼀台三层交换机连到校园⽹出⼝路由器上,路由器再和校园外的另⼀台路由器连接。
现要做适当配置,实现校园⽹内部主机与校园⽹外部主机之间的相互通信。
为了简化⽹管的管理维护⼯作,学校决定采⽤RIPV2协议实现互通。
三、技术原理1. RIP(Routing Information Protocols,路由信息协议)是应⽤较早、使⽤较普遍的IGP内部⽹管协议,使⽤于⼩型同类⽹络,是距离⽮量协议;2. RIP协议跳数作为衡量路径开销的,RIP协议⾥规定最⼤跳数为15;3. RIP协议有两个版本:RIPv1和RIPv2,RIPv1属于有类路由协议,不⽀持VLSM,以⼴播形式进⾏路由信息的更新,更新周期为30秒;RIPv2属于⽆类路由协议,⽀持VLSM,以组播形式进⾏路由更细。
四、实验步骤 建⽴建⽴packet tracer拓扑图 (1)在本实验中的三层交换机上划分VLAN10和VLAN20,其中VLAN10⽤于连接校园⽹主机,VLAN20⽤于连接R1。
(2)路由器之间通过V.35电缆通过串⼝连接,DCE端连接在R1上,配置其时钟频率64000。
(3)主机和交换机通过直连线,主机与路由器通过交叉线连接。
(4)在S3560上配置RIPV2路由协议。
(5)在路由器R1、R2上配置RIPV2路由协议。
(6)将PC1、PC2主机默认⽹关设置为与直连⽹路设备接⼝IP地址。
(7)验证PC1、PC2主机之间可以互相同信;五、实验设备 PC 2台;Switch_3560 1台;Router-PT 2台;直连线;交叉线;DCE 串⼝线六、实验拓扑图七、实验命令PC1IP: 192.168.1.2Submask: 255.255.255.0Gateway: 192.168.1.1 PC2IP: 192.168.2.2Submask: 255.255.255.0Gateway: 192.168.2.1S3560enconf thostname S3560vlan 10exitvlan 20exitinterface fa 0/10switchport access vlan 10exitinterface fa 0/20switchport access valn 20exitendshow vlanconf tinterface vlan 10ip address 192.168.1.1 255.255.255.0no shutdownexitinterface vlan 20ip address 192.168.3.1 255.255.255.0no shutdownendshow ip routeshow runingconf trouter ripnetwork 192.168.1.0network 192.168.3.0version 2endshow ip routeR1enconf thostname R1interface fa 0/0no shutdownip address 192.168.3.2 255.255.255.0interface serial 2/0no shutdownip address 192.168.4.1 255.255.255.0clock rate 64000endshow ip routeconf trouter ripnetwork 192.168.3.0network 192.168.4.0version 2exitR2enconf thostname R2interface fa 0/0no shutdownip address 192.168.2.1 255.255.255.0interface serial 2/0no shutdownip address 192.168.4.2 255.255.255.0endshow ip routeconf trouter ripnetwork 192.168.2.0netword 192.168.4.0version 2end⼋、实验结果 配置PC0、PC1的IP地址: 配置S3560: 配置R1: 配置R2: PC0 ping PC1:。
实验的基本配置一、试验环境IP地址配置:步骤 1. 配置全局配置主机名设置:可以使用哪两个命令离开特权执行模式?exit和end。
可使用什么快捷命令进入特权执行模式?enable。
研究可以通过命令configure 进入的不同配置模式:Router>enableRouter# configure terminal Router(config)#将设备的主机名设为Router1:router(config)# hostname Router1 Router1(config)#步骤 2. 配置MOTD 标语:Router1(config)# banner motd %Enter TEXT message.End with the character ‘%’ *** *** % Router1(config)#1步骤3:配置特权执行口令。
将特权执行口令设置为class:Router1(config)# enable secret classRouter1(config)#步骤4:配置控制台口令:将控制台访问口令设置为cisco:Router1(config)# line console 0Router1(config-line)# password ciscoRouter1(config-line)# login步骤5:配置虚拟线路口令。
将虚拟线路访问口令设置为cisco:Router1(config-line)# line vty 0 4Router1(config-line)# password ciscoRouter1(config-line)# loginRouter1(config-line)# exitRouter1(config)#步骤6:配置路由器的fa0/0 接口:Router1(config)# interface fa0/0Router1(config-if)# description Connection to PC1 with crossover cable Router1(config-if)# ip address 198.168.1.1 255.255.255.0Router1(config-if)# no shutdownRouter1(config-if)# exitRouter1(config)#步骤7:配置路由器的s2/0 接口:Router1(config)# interface s2/0Router1(config-if)# description Connection to Router1 with DCE serial line Router1(config-if)# ip address 198.168.10.1 255.255.255.0Router1(config-if)# no shutdownRouter1(config-if)# exitRouter1(config)#步骤8:配置路由器Router2和Router3:依照以上Router1的配置注:路由器之间连接①串口(须在路由器的DCE端口设置时钟);②以太网设置路由器1(Router1)的s2/0端口(DCE线连接)设置路由器1(Router1)的s2/0端口时钟:Router1(config)# interface s2/0Router1(config-if)# clock rate 12002Router1(config-if)# exit Router1(config)#设置路由器2(Router2)的s3/0端口(DCE线连接)设置路由器2(Router2)的s3/0端口时钟:Router2(config)# interface s3/0Router2(config-if)# clock rate 1200 Router2(config-if)# exit Router2(config)#缺省路由和静态路由试验知识点静态路由静态路由是指由网络管理员手工配置的路由信息。
c i s c o I P路由分解实验1.在路由表中查找特定的路由条目Known via "ospf 55", distance 110, metric 11, type inter areaRedistributing via ospf 55Routing Descriptor Blocks:Route metric is 11, traffic share count is 1% Network not in table注意的是这里都是无类路由,如果有类的就不一样了2.在路由表中查找相同类型的路由条目Router>show ip route staticsubnetted, 1 subnetsS还有一个更有用的命令Router>show ip route summaryIP routing table name is Default-IP-Routing-Table(0)Route Source Networks Subnets Overhead Memory (bytes)connected 0 3 328 432static 1 0 64 144ospf55 1 3 256 576Intra-area: 1 Inter-area: 2 External-1: 1 External-2: 0NSSA External-1: 0 NSSA External-2: 0internal 2 2328Total 4 6 648 3480注释通过显示路由表的统计情况来了解当前路由器的路由条目,也可以用来以后的比对3.配置静态路由Router#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Router(config)#endRouter#也可以给路由条目打上标签Router#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Router(config)#endRouter#注释在类似以太网这种多路访问的网络中建议使用下一跳为地址而不是接口。
正常情况下路由器对静态路由的下一跳有效性的检查是一分钟,在12.3(10)以后增加了下面的命令可以对此时间进行调整Router(config)#ip route static adjust-time 30。
对静态路由打tag用于路由再发布时的区分4.当动态路由出问题的时候使用静态路由作为备份Router#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Router(config)#endRouter#注释通过调整管理距离的方式来进行路由备份,不过要注意的是管理距离只适合在相同路由的情况下,路由条目的最长匹配是第一位的。
另外在不同厂商设备互联的时候,调整管理距离一定要设置合理。
5.根据源地址的不同选择不同的路径Router#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Router(config)#interface Ethernet0Router(config-if)#ip policy route-map EngineersRouter(config-if)#ip route-cache policyRouter(config-if)#exitRouter(config)#route-map Engineers permit 10Router(config-route-map)#match ip address 1Router(config-route-map)#exitRouter(config)#route-map Engineers permit 20Router(config-route-map)#match ip address 2Router(config-route-map)#set interface Ethernet1Router(config-route-map)#endRouter#注释缺省情况下route map的最后一句都是deny all,这样不符合route map规则的数据包都会按照正常的路由表进行转发。
set ip next-hop verify-availability命令提供了对下一跳的验证,不过是基于CDP的,所以如果使用此命令需要打开CDP,最好同时调整时长,毕竟缺省是180秒。
在使用策略路由时会在排错时增加难度,因为缺省对于本路由器发出的数据包可以绕过route map这样会造成错觉。
6.根据不同的应用来选择不同的路径Router#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Router(config)#access-list 101 permit tcp any any eq wwwRouter(config)#interface Ethernet0Router(config-if)#ip policy route-map WebsurfersRouter(config-if)#ip route-cache policyRouter(config-if)#exitRouter(config)#route-map Websurfers permit 10Router(config-route-map)#match ip address 101Router(config-route-map)#exitRouter(config)#route-map Websurfers permit 20Router(config-route-map)#endRouter#对于本设备的发出的数据包也使用策略路由Router#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Router(config)#ip local policy route-map dlswtrafficRouter(config)#access-list 103 permit tcp any any eq 2065Router(config)#access-list 103 permit tcp any eq 2065 anyRouter(config)#route-map dlswtraffic permit 10Router(config-route-map)#endRouter#注释正常情况下如果所有定义的下一跳都不存在的情况下会使用路由表来查询,如果路由表没有此定义会使用缺省路由,这时候你可以使用set ip default next-hop来定义一个不同的缺省路由7.检查所应用的策略路由Router>show ip policyInterface Route maplocal dlswtrafficEthernet0 WebsurfersSerial0 High-priorityRouter>show route-maproute-map High-priority, permit, sequence 10Match clauses:ip address (access-lists): 101Set clauses:Policy routing matches: 0 packets, 0 bytesroute-map Websurfers, permit, sequence 10Match clauses:ip address (access-lists): 102Set clauses:Policy routing matches: 0 packets, 0 bytesroute-map Websurfers, permit, sequence 20Match clauses:Set clauses:Policy routing matches: 4 packets, 531 bytesroute-map dlswtraffic, permit, sequence 10Match clauses:ip address (access-lists): 103Set clauses:注释也可以通过show access-list 103命令看到更多的匹配信息8.调整学到的外部网络的缺省管理距离Router#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Router(config)#router ripRouter(config-route)#distance 255Router(config-route)#endRouter#Router#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Router(config)#router eigrp 111Router(config-route)#distance eigrp 55 200Router(config-route)#endRouter#Router#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Router(config)#router ospf 66Router(config-route)#distance ospf inter-area 115Router(config-route)#distance ospf intra-area 105Router(config-route)#distance ospf external 125Router(config-route)#endRouter#Router#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Router(config)#router bgp 65520Router(config-route)#distance bgp 115 220 50Router(config-route)#endRouter#注释管理距离只是针对自己的,通过调整这些外部路由的管理距离来调整自己路由表的结构Router#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Router(config)#router ospf 65510Router(config-router)#maximum-paths 2Router(config-router)#endRouter#IOS 12.2T以后对BGP增加了下面的命令Router#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Router(config)#router bgp 65511Router(config-router)#maximum-paths 2Router(config-router)#maximum-paths ibgp 3Router(config-router)#endRouter#注释缺省情况下静态路由可以有6条冗余,BGP只有一条最佳路径,其他路由协议为4条。