




已阅读5页,还剩7页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
课题: 路由器综合路由配置教学目标 掌握综合路由的配置方法; 掌握查看通过路由重分布学习产生的路由; 熟悉广域网线缆的连接方式;教学重点:掌握综合路由的配置方法教学难点:掌握查看通过路由重分布学习产生的路由教具、教学素材准备:网络环境教学方法:讲授,演示,实作教学时数:2假设某公司通过一台三层交换机连到公司出口路由器R1上,路由器R1再和公司外的另一台路由器R2连接。三层与R1间运行RIPv2路由协议,R1与R2间运行OSPF路由协议。现要做适当配置,实现公司内部主机与公司外部主机之间的相互通信。基本原理为了支持本设备能够运行多个路由协议进程,系统软件提供路由信息从一个路由进程重分布到另外一个路由进程的功能。比如你可以将OSPF路由域的路由重新分布后通告RIP路由域中,也可以将RIP路由域的路由重新分布后通告到OSPF路由域中。路由的相互重分布可以在所有的IP路由协议之间进行。要把路由从一个路由域分布到另一个路由域,并且进行控制路由重分布,在路由进程配置模式中执行以下命令:redistribute protocol metric metric metric-type metric-type match internal | external type | nssa-external type tag tag route-map route-map-name subnets教学过程实验拓扑1、PC与交换机间用直连线连接;PC与路由、路由与路由之间用交叉线连接。2、在三层上划分2个VLAN,运行RIPv2协议;R2运行OSPF协议;3、在路由器R1上左侧配置RIPv2路由协议;右侧配置OSPF协议;4、在R1路由器进程中引入外部路由,进行路由重分布;5、将PC1、PC2主机默认网关分别设置为与直连网络设备接口IP地址;6、验证PC1、PC2主机之间可以互相通信;S3560:SwitchenSwitch#conf tEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#hostname S3560S3560(config)#vlan 10S3560(config-vlan)#exitS3560(config)#vlan 20S3560(config-vlan)#exitS3560(config)#interface fa0/10S3560(config-if)#switchport access vlan 10S3560(config-if)#exitS3560(config)#interface fa0/20S3560(config-if)#switchport access vlan 20S3560(config-if)#exitS3560(config)#interface vlan 10S3560(config-if)#%LINK-5-CHANGED: Interface Vlan10, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan10, changed state to upS3560(config-if)#ip address 192.168.1.1 255.255.255.0 /配置vlan 10虚接口IP地址S3560(config-if)#exitS3560(config)#interface vlan 20%LINK-5-CHANGED: Interface Vlan20, changed state to upS3560(config-if)#S3560(config-if)#ip address 192.168.2.1 255.255.255.0 /配置vlan 20虚接口IP地址S3560(config-if)#no shutS3560(config-if)#exitS3560(config)#router rip /配置RIPv2协议S3560(config-router)#network 192.168.1.0S3560(config-router)#network 192.168.2.0S3560(config-router)#version 2S3560(config-router)#endS3560#%SYS-5-CONFIG_I: Configured from console by consoleS3560#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 N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 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, ia - IS-IS inter area * - candidate default, U - per-user static route, o - ODR P - periodic downloaded static routeGateway of last resort is not setC 192.168.1.0/24 is directly connected, Vlan10S3560#S3560#S3560#%LINK-5-CHANGED: Interface FastEthernet0/20, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/20, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan20, changed state to upS3560#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 N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 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, ia - IS-IS inter area * - candidate default, U - per-user static route, o - ODR P - periodic downloaded static routeGateway of last resort is not setC 192.168.1.0/24 is directly connected, Vlan10C 192.168.2.0/24 is directly connected, Vlan20S3560#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 N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 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, ia - IS-IS inter area * - candidate default, U - per-user static route, o - ODR P - periodic downloaded static routeGateway of last resort is not setC 192.168.1.0/24 is directly connected, Vlan10C 192.168.2.0/24 is directly connected, Vlan20R 192.168.3.0/24 120/1 via 192.168.2.2, 00:00:28, Vlan20R 192.168.4.0/24 120/2 via 192.168.2.2, 00:00:28, Vlan20S3560#S3560#show running-config Building configuration.Current configuration : 1276 bytes!version 12.2no service timestamps log datetime msecno service timestamps debug datetime msecno service password-encryption!hostname S3560!.!interface FastEthernet0/1!.!interface FastEthernet0/10switchport access vlan 10!.!interface FastEthernet0/20switchport access vlan 20!.!interface Vlan1no ip addressshutdown!interface Vlan10ip address 192.168.1.1 255.255.255.0!interface Vlan20ip address 192.168.2.1 255.255.255.0!router ripversion 2network 192.168.1.0network 192.168.2.0!ip classless!.!line con 0line vty 0 4login!endS3560#R1:RouterenRouter#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#hostname R1R1(config)#interface fa0/0R1(config-if)#no shutdown %LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to upR1(config-if)#ip address 192.168.2.2 255.255.255.0R1(config-if)#exitR1(config)#interface fa0/1R1(config-if)#no shutdown %LINK-5-CHANGED: Interface FastEthernet0/1, changed state to upR1(config-if)#ip address 192.168.3.1 255.255.255.0R1(config-if)#exitR1(config)#router rip /R1左侧配置RIPv2路由协议R1(config-router)#network 192.168.2.0R1(config-router)#version 2R1(config-router)#exitR1(config)#router ospf 1 /R1右侧配置OSPF路由协议R1(config-router)#network 192.168.3.1 0.0.0.255 area 0R1(config-router)#endR1#%SYS-5-CONFIG_I: Configured from console by consoleR1#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 N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 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, ia - IS-IS inter area * - candidate default, U - per-user static route, o - ODR P - periodic downloaded static routeGateway of last resort is not setR 192.168.1.0/24 120/1 via 192.168.2.1, 00:00:14, FastEthernet0/0C 192.168.2.0/24 is directly connected, FastEthernet0/0C 192.168.3.0/24 is directly connected, FastEthernet0/1R1#R1#R1#R1#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 N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 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, ia - IS-IS inter area * - candidate default, U - per-user static route, o - ODR P - periodic downloaded static routeGateway of last resort is not setR 192.168.1.0/24 120/1 via 192.168.2.1, 00:00:06, FastEthernet0/0C 192.168.2.0/24 is directly connected, FastEthernet0/0C 192.168.3.0/24 is directly connected, FastEthernet0/1O 192.168.4.0/24 110/2 via 192.168.3.2, 00:01:22, FastEthernet0/1R1#ping 192.168.1.2 /从R1 ping左侧主机,可以ping通Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds: .!Success rate is 60 percent (3/5), round-trip min/avg/max = 3/5/8 msR1#ping 192.168.4.2 /从R1 ping右侧主机,可以ping通 /此时左侧主机ping不通右侧主机Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.4.2, timeout is 2 seconds:.!Success rate is 80 percent (4/5), round-trip min/avg/max = 3/5/7 msR1#R1#R1#conf tEnter configuration commands, one per line. End with CNTL/Z.R1(config)#router ripR1(config-router)#redistribute ospf 1R1(config-router)#exitR1(config)#router ospf 1R1(config-router)#redistribute rip ? metric Metric for redistributed routes metric-type OSPF/IS-IS exterior metric type for redistributed routes subnets Consider subnets for redistribution into OSPF tag Set tag for routes redistributed into OSPF R1(config-router)#redistribute rip subnets R1(config-router)#endR1#%SYS-5-CONFIG_I: Configured from console by consoleR1#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 N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 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, ia - IS-IS inter area * - candidate default, U - per-user static route, o - ODR P - periodic downloaded static routeGateway of last resort is not setR 192.168.1.0/24 120/1 via 192.168.2.1, 00:00:03, FastEthernet0/0C 192.168.2.0/24 is directly connected, FastEthernet0/0C 192.168.3.0/24 is directly connected, FastEthernet0/1O 192.168.4.0/24 110/2 via 192.168.3.2, 00:02:41, FastEthernet0/1R1#R1#R1#show running-config Building configuration.Current configuration : 643 bytes!version 12.4no service timestamps log datetime msecno service timestamps debug datetime msecno service password-encryption!hostname R1!.!interface FastEthernet0/0ip address 192.168.2.2 255.255.255.0duplex autospeed auto!interface FastEthernet0/1ip address 192.168.3.1 255.255.255.0duplex autospeed auto!interface Vlan1no ip addressshutdown!router ospf 1log-adjacency-changesredistribute rip subnets network 192.168.3.0 0.0.0.255 area 0!router ripversion 2redistribute ospf 1 network 192.168.2.0!ip classless!.!line con 0line vty 0 4login!endR1#R2:RouterenRouter#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#hostname R2R2(config)#interface fa0/1R2(config-if)#ip address 192.168.4.1 255.255.255.0R2(config-if)#no shutdown %LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to upR2(config-if)#exitR2(config)#interface fa0/0R2(config-if)#ip address 192.168.3.2 255.255.255.0R2(config-if)#no shutdown %LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to upR2(config-if)#R2(config-if)#exitR2(config)#router ospf % Incomplete command.R2(config)#router ospf 1 /配置R2 OSPF路由协议R2(config-router)#network 192.168.3.0 0.0.0.255 area 0R2(config-router)#network 192.168.4.0 0.0.0.255 area 0R2(config-router)#endR2#%SYS-5-CONFIG_I: Configured from console by consoleR2#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 N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 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, ia - IS-IS inter area * - candidate default, U - per-user static route, o - ODR P - periodic downloaded static routeGateway of last resort is not setC 192.168.3.0/24 is directly connected, FastEthernet0/0C 192.168.4.0/24 is directly connected, FastEthernet0/1R2#00:06:39: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.3.1 on FastEthernet0/0 from LOADING to FULL, Loading DoneR2#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 N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 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, ia - IS-IS inter area * - candidate default, U - per-user static route, o - ODR P - periodic downloaded static routeGa
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
评论
0/150
提交评论