Presentation is loading. Please wait.

Presentation is loading. Please wait.

路由器.

Similar presentations


Presentation on theme: "路由器."— Presentation transcript:

1 路由器

2 路由器概述 工作的层 路由器的作用

3 路由器的命令状态 Router> 用户执行命令状态 Router# 特权模式 Router(config)# 全局配置模式
Router(config-if)# 局部(接口)配置模式 > RXBOOT状态

4 路由器的密码 enable password 密码以明文的形式存在 enable secret 密码加密存储 两者都设置的时候,后者生效。

5 静态路由设置

6 动态路由协议 路由表 路由器的主要工作就是为经过路由器的每个数据帧寻找一条最佳传输路径,并将该数据有效地传送到目的站点。由此可见,选择最佳路径的策略即路由算法是路由器的关键所在。为了完成这项工作,在路由器中保存着各种传输路径的相关数据——路由表(Routing Table),供路由选择时使用。 1.静态路由表 由系统管理员事先设置好固定的路由表称之为静态(static)路由表,一般是在系统安装时就根据网络的配置情况预先设定的,它不会随未来网络结构的改变而改变。 2.动态路由表 动态(Dynamic)路由表是路由器根据网络系统的运行情况而自动调整的路由表。路由器根据路由选择协议(Routing Protocol)提供的功能,自动学习和记忆网络运行情况,在需要时自动计算数据传输的最佳路径。

7 动态路由协议 RIP (Routing Information Protocol)
IGRP (Interior Gateway Routing Protocol) OSPF (Open Shortest Path First) EIGRP (Enhanced Interior Gateway Routing Protocol -)

8 RIP路由协议 实训任务:用RIP动态路由协议配置以下网络拓扑图 要求:六台机相互之间都能访问。

9 RIP路由协议 RIP路由表的建立 基本思想: 路由器周期性地向其相邻路由器广播自己知道的路由信息,用于通知相邻路由器自己可以到达的网络以及到达该网络的距离 。 相邻路由器可以根据收到的路由信息修改和刷新自己的路由表。 过程: (1)路由器在刚刚开始工作时,只知道到直接连接的网络的距离(此距离定义为1)。 (2)以后,每一个路由器也只和数目非常有限的相邻路由器交换并更新路由信息。 (3)经过若干次更新后,所有的路由器最终都会知道到达本自治系统中任何一个网络的最短距离和下一跳路由器的地址。

10 RIP路由协议 RIP 协议的三个要点 (1)仅和相邻路由器交换信息。 (2)交换的信息是当前本路由器所知道的全部信息,即自己的路由表。
(3)RIP广播一个UDP数据包更换路由信息,每个路由器间隔30秒更换一次路由信息,在180秒内未收到某路由器的回应,它则认为目前该路由器不可到达;若在270秒后仍未有应答,则把有关它的路由信息从路由表中删掉。

11 RIP协议的配置: (1)网络拓扑

12 RIP协议的配置: (2)配置本实训网络环境的RIP路由协议: 第一步: DCR-1702配置:
Router(config)#hostname Router //对路由器重新命名 Router-1702(config)#interface Fastethenet0/0 //进入F0/0口的配置模式 Router-1702(config-f0/0)#ip address //给F0/0口固定IP Router-1702(config-f0/0)#exit //退出F0/0配置模式 Router-1702(config)#interface serial0/2 //进入S0/2口配置模式 Router-1702(config-s0/2)#ip address //给S0/2固定IP Router-1702(config-s0/2)#exit

13 RIP协议的配置: DCR-2611配置: Router(config)#Hostname Router-2611
Router-2611(config)#interface Fastethenet0/0 //进入F0/0口的配置模式 Router-2611(config-f0/0)#ip address //给F0/0口固定IP Router-2611(config-f0/0)#exit //退出F0/0配置模式 Router-2611(config)#interface serial0/ //进入S0/2口配置模式 Router-2611(config-s0/2)#physical-layer speed 64000 //DCE端封装时钟频率64000 Router-2611(config-s0/2)#ip address //给S0/2固定IP Router-2611(config-s0/2)#exit

14 RIP协议的配置: 配置RIP的语法: RouterA#config //进入路由器配置特权模式
RouterA_config#router rip //启用并配置RIP路由选择协议 RouterA_config_rip#version version-number //RIP协议的运行版本号 RouterA_config_rip#network network-number //广播RIP协议信息的网络

15 RIP协议的配置: DCR-1702操作: 第二步:配置路由器的RIP协议 Router-1702#config //进入路由器配置特权模式
Router-1702(config)#router rip //启用并配置RIP路由选择协议 Router-1702(config_rip)#version 2 //RIP协议的运行版本2 Router-1702(config_rip)#network //广播网络“ ”的RIP协议信息 Router-1702(config_rip)#network //广播网络“ ”的RIP协议信息

16 RIP协议的配置: DCR-2611操作: Router-2611#config //进入路由器配置特权模式
Router-2611(config)#router rip //启用并配置RIP路由选择协议 Router-2611(config_rip)#version 2 //RIP协议的运行版本2 Router-2611(config_rip)#network //广播网络“ ”的RIP协议信息 Router-2611(config_rip)#network //广播网络“ ”的RIP协议信息

17 RIP协议的配置: 验证RIP路由协议 PC机的网关和IP地址 1)每两台电脑之间进行互相PING,测试每两台电脑是否能够交换数据报。
2)PC2能访问PC4发布的主页,PC5能访问PC3发布的主页。

18 路由器RA路由表信息

19 6.4 RIP协议 6.4.1 RIP概述 RIP属于典型的距离向量路由选择协议。
RIPV1是一种有类路由协议,不支持不连续子网设计;而RIPV2是一种无类路由协议。 RIP周期进行路由更新,将路由表广播给邻居路由器,广播周期为30秒。 RIP的管理距离为120。 RIP使用非常广泛,它简单、可靠、便于配置,但是只适用于小型的同构网络。

20 RIP封装结构

21 6.4.2 RIP路由表形成过程 1.路由表的初始状态

22 2.路由表的更新

23 3.路由表的收敛

24 6.4.3 路由自环问题及解决方法 1.路由自环问题的产生

25 RIP协议的配置: 诊断和排除RIP配置故障 1、路由器端口与IP地址的对应关系。 2、RIP版本号问题。

26 RIP协议的配置: 小结: 1、动态路由协议的配置只需要将路由器直接连接的网络段加入路由协议的宣告中即可。
2、当使用了直连路由的重分布时,去掉路由宣告网段就不必再保留,可以删除,不会影响网络连通性。 3、直连路由重分布可以避免路由器向没有其他路由器存在的网络段发送路由信息。

27 IGRP协议 IGRP由于突破了15跳的限制,成为了当时大型CISCO网络的首选协议。(100->大型网络)
RIP与IGRP的工作机制,均是从所有配置接口上定期发出路由更新。 但是,RIP是以跳数为度量单位;IGRP以多种因素来建立路由最佳路径;带宽,延迟,可靠性,最大传输单元,LOAD等因素。

28 什么是区域 ? 区域拓朴从区域外是看不见的 结果是路由业务的大量减少 Backbone Area #0 Area #3 Area #2
52

29 IGRP的配置: 2501(config)#router igrp 100
2501(config-router)#network 2501(config-router)#exit 注意: 1)编号的有效范围为1-65535,编号用确定一组区域编号相同的路由器和接口 2)不同的编号的路由器不参与路由更新

30 IGRP的验证: 2501#show run(查看配置文件) 2501#show ip protocols(IP路由协议)
2501#show ip route(IP路由表) 2501#show ip route C - connected, 直接相连的网络; S - static, 静态路由 I - IGRP, R - RIP, B - BGP , D - EIGRP, O - OSPF,

31 路由配置修改: 1,路由删除: 2501(config)#no router igrp 100 2501(config)#
2,IP地址的删除 2501(config)#int s0 2501(config-if)#no ip add 2501(config-if)#no ip address 2501(config-if)#

32 IGRP Configuration Example
Autonomous System = 100 E0 S2 S2 S3 S3 E0 A B C router igrp 100 network network router igrp 100 network network Purpose: The figure shows how the IGRP commands operate on the example network. Emphasize: An administrator only specifies directly connected networks that he wishes to publish to other routers. Without the network command, nothing is advertised. With a network command, the router will advertise every subnet within the Class A, B, or C network specified in the configuration. router igrp 100 network

33 Verifying the Routing Protocol—IGRP
S2 S2 S3 S3 E0 A B C RouterA#sh ip protocols Routing Protocol is "igrp 100" Sending updates every 90 seconds, next due in 21 seconds Invalid after 270 seconds, hold down 280, flushed after 630 Outgoing update filter list for all interfaces is Incoming update filter list for all interfaces is Default networks flagged in outgoing updates Default networks accepted from incoming updates IGRP metric weight K1=1, K2=0, K3=1, K4=0, K5=0 IGRP maximum hopcount 100 IGRP maximum metric variance 1 Redistributing: igrp 100 Routing for Networks: Routing Information Sources: Gateway Distance Last Update :01:01 Distance: (default is 100) Purpose: This figure shows how the show ip protocol command is used to monitor IGRP operation. Emphasize: The command displays the routing protocols that are active on the router for IP. It also gives network and timer information. In this example, IGRP is displayed. Point out the timing information. Point out the list of networks for which the router is injecting routes. Point out the administrative distance metric.

34 Displaying the IP Routing Table
A B C RouterA#sh 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, * - candidate default U - per-user static route, o - ODR T - traffic engineered route Gateway of last resort is not set /24 is subnetted, 1 subnets C is directly connected, Ethernet0 /24 is subnetted, 2 subnets I [100/90956] via , 00:00:23, Serial2 C is directly connected, Serial2 I /24 [100/91056] via , 00:00:23, Serial2 Purpose: This figure displays the show ip route command which displays the contents of the router’s IP routing table. Emphasize: This is the same command presented earlier in the chapter. Discuss the IP routing table in detail. The [100/90956] represent the administrative distance and metric, respectively. Discuss the following fields: I—Refers to routes learned from IGRP. via—Refers to the router that informed us about this route. 00:00:23 timer value—IGRP updates are every 90 seconds. Ask, “How long until the next update?” The interfaces to used for the best path.

35 SHOW IP ROUTE I /24 [100/91056] via , 00:00:23, Serial2 I:表示由IGRP所引入的路由, 100:表示IGRP的管理距离; 91056:表示组合度量值;组合度量值越低,说明路由越好;组合度量是通过带宽和线路延迟计算出来的。

36 Updating Routing Information Example (cont.)
S2 S2 S3 S3 E0 A B C RouterB#sh 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, * - candidate default U - per-user static route, o - ODR T - traffic engineered route Gateway of last resort is not set I /16 is possibly down, routing via , Serial2 /24 is subnetted, 2 subnets C is directly connected, Serial2 C is directly connected, Serial3 I /24 [100/89056] via , 00:00:14, Serial3 RouterB#ping Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to , timeout is 2 seconds: ..... Success rate is 0 percent (0/5) RouterB# Slide 3 of 4: Purpose: This figure continues to illustrate IGRP update operation when network information changes. Emphasize: B places route to network in holddown state. The route is marked as “possibly down” while in holddown. B will still attempt to forward packets destined to

37 是否支持IP ROUTE 4000a(config)#no ip routing 4000a(config)#router rip
IP routing not enabled 4000a(config)#router igrp 100 4000a(config)#ip routing 4000a(config-router)#


Download ppt "路由器."

Similar presentations


Ads by Google