1 / 28

《 数据通信技术与应用 》

《 数据通信技术与应用 》. 第三单元:路由技术与应用. 第 2 讲:路由分类. 主讲人:史红彦. 学习目标:. 掌握路由分类 理解直连路由的特点 理解静态路由的特点 掌握静态路由的配置 理解动态路由的特点. 1. 路由分类 2. 直连路由 3. 静态路由 4. 动态路由 5. 缺省路由. 直连路由. 路由分类. 静态路由. 动态路由. 缺省路由. 1. 路由分类 2. 直连路由 3. 静态路由 4. 动态路由 5. 缺省路由. 直连路由. 直连路由是指 与路由器相直连的 网段的路由条目。

zwi
Télécharger la présentation

《 数据通信技术与应用 》

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 《数据通信技术与应用》 第三单元:路由技术与应用 第2讲:路由分类 主讲人:史红彦

  2. 学习目标: • 掌握路由分类 • 理解直连路由的特点 • 理解静态路由的特点 • 掌握静态路由的配置 • 理解动态路由的特点

  3. 1.路由分类 2.直连路由 3.静态路由 4.动态路由 5.缺省路由

  4. 直连路由 路由分类 静态路由 动态路由 缺省路由

  5. 1.路由分类 2.直连路由 3.静态路由 4.动态路由 5.缺省路由

  6. 直连路由 直连路由是指与路由器相直连的网段的路由条目。 直连路由不需要特别配置,只需要在路由器接口上设置IP地址,然后由链路层发现(链路层协议UP,路由表中即可出现相应路由条目;链路层协议DOWN,相应路由条目消失)。 链路层发现的路由不需要维护,减少了维护的工作。 不足之处是链路层只能发现接口所在的直连网段的路由,无法发现跨网段的路由。跨网段的路由需要用其他的方法获得。

  7. 10.1.1.0/30 RTB RTA .2 .1 .1 10.1.2.0/24 .2 RTC 直连路由 [RTB]display ip routing-table Routing Tables: Public Destinations : 8 Routes : 8 Destination/Mask Proto Pre Cost NextHop Interface 10.1.1.0/30 Direct 0 0 10.1.1.1 Serial0/0/0 10.1.1.1/32 Direct 0 0 127.0.0.1 InLoopBack0 …… 10.1.2.1/32 Direct 0 0 127.0.0.1 InLoopBack0 10.1.2.2/32 Direct 0 0 10.1.2.2 Serial0/0/1 127.0.0.0/8 Direct 0 0 127.0.0.1 InLoopBack0 127.0.0.1/32 Direct 0 0 127.0.0.1 InLoopBack0

  8. 1.路由分类 2.直连路由 3.静态路由 4.动态路由 5.缺省路由

  9. 静态路由 • 静态路由是由管理员手工配置而生成的路由。 • 其优点为: • 使用简单,容易实现 • 可精确控制路由走向,对网络进行最优化调整 • 对设备性能要求较低,不额外占用链路带宽 • 其缺点为: • 网络是否通畅以及是否优化,完全取决于管理员的配置 • 网络规模扩大时,由于路由表项的增多,将增加配置的繁杂度以及管理员的工作量 • 网络拓扑发生变更时,不能自动适应,需要管理员参与修正

  10. 静态路由的应用 • 静态路由在实际应用中相当广泛,通常应用于以下两个场景: • 小规模、稳定的网络。 • 路径选择的控制,即控制某些目的网络的路由走向。

  11. 在路由器B上配置到达路由器A的10.1.1.1网段的静态路由。 静态路由配置 RTA RTB .1 .2 1.1.1.0/24 10.1.1.1/32 20.1.1.1/32 S0 S0 [RTB] ip route-static 10.1.1.1 255.255.255.255 1.1.1.1 或者 [RTB] ip route-static 10.1.1.1 32 1.1.1.1 或者 [RTB] ip route-static 10.1.1.1 32 Serial 0

  12. 在路由器B上配置到达路由器A的10.1.1.1网段的三条负载路由 静态路由的负载分担 RTA RTB 1.1.1.0/24 2.2.2.0/24 10.1.1.1/32 20.1.1.1/32 3.3.3.0/24 .1 .2 [RTB] ip route-static 10.1.1.1 255.255.255.255 1.1.1.1 [RTB] ip route-static 10.1.1.1 255.255.255.255 2.2.2.1 [RTB] ip route-static 10.1.1.1 255.255.255.255 3.3.3.1

  13. [RTB] display ip routing-table • Routing Tables: Public • Destinations : 13 Routes : 15 • Destination/Mask Proto Pre Cost NextHop Interface • 1.1.1.0/24 Direct 0 0 1.1.1.2 Serial0 • 1.1.1.1/32 Direct 0 0 1.1.1.1 Serial0 • 1.1.1.2/32 Direct 0 0 127.0.0.1 InLoopBack0 • …… • 10.1.1.1/32 Static 60 0 1.1.1.1 Serial0 • Static 60 0 2.2.2.1 Serial1 • Static 60 0 3.3.3.1 Serial2 • …… 222222222222 222222222 等价路由,实现负载分担

  14. 在路由器B上配置到达路由器A的10.1.1.1网段的备份路由 静态路由的路由备份 RTA RTB 1.1.1.0/24 20.1.1.1/32 10.1.1.1/32 2.2.2.0/24 .1 .2 [RTB] ip route-static 10.1.1.1 255.255.255.255 1.1.1.1 [RTB] ip route-static 10.1.1.1 255.255.255.255 2.2.2.1 preference 100

  15. 路由备份 • [RTB] display ip routing-table • Routing Tables: Public • Destinations : 13 Routes : 15 • Destination/Mask Proto Pre Cost NextHop Interface • 1.1.1.0/24 Direct 0 0 1.1.1.2 Serial0 • 1.1.1.1/32 Direct 0 0 1.1.1.1 Serial0 • 1.1.1.2/32 Direct 0 0 127.0.0.1 InLoopBack0 • …… • 10.1.1.1/32 Static 60 0 1.1.1.1 Serial0 • 20.1.1.1/32 Direct 0 0 127.0.0.1 InLoopBack0 • …… 路由器优选优先级别高的路由

  16. 路由备份 • [RTB] display ip routing-table protocol static • Public Routing Table : Static • Destinations : 1 Routes : 2 • Static Routing table Status : < Active> • Destinations : 1 Routes : 1 • Destination/Mask Proto Pre Cost NextHop Interface • 10.1.1.1/32 Static 60 0 1.1.1.1 Serial0 • Static Routing table Status : < Inactive> • Destinations : 1 Routes : 1 • Destination/Mask Proto Pre Cost NextHop Interface • 10.1.1.1/32 Static 100 0 2.2.2.1 Serial1 优先级高,主用路由,加入到路由表 优先级低,备用路由,不加入路由表

  17. 路由备份 断开主用链路 • [RTB-Serial0] shutdown • [RTB-Serial0] display ip routing-table • Routing Tables: Public • Destinations : 7 Routes : 7 • Destination/Mask Proto Pre Cost NextHop Interface • 2.2.2.0/24 Direct 0 0 2.2.2.2 Serial1 • 2.2.2.1/32 Direct 0 0 2.2.2.1 Serial1 • 2.2.2.2/32 Direct 0 0 127.0.0.1 InLoopBack0 • 10.1.1.1/32 Static 100 0 2.2.2.1 Serial1 • …… 备用路由自动变为主用,加入到路由表中。

  18. 1.路由分类 2.直连路由 3.静态路由 4.动态路由 5.缺省路由

  19. 动态路由 OSPF RIP OSPF RIP 1.0.0.0/8 2.0.0.0/8 3.0.0.0/8 路由协议是运行在路由器上的软件进程,与其他路由器上相同路由协议之间交换路由信息,学习非直连网络的路由信息,加入路由表。并且在网络拓扑结构变化时自动调整,维护正确的路由信息。

  20. 172.16.1.1/32 RTC .2 OSPF 10.1.2.0/24 RTA RIP .1 10.1.1.0/8 .1 .2 192.168.2.1/24 RTB 动态路由 [RTB]display ip routing-table Routing Tables: Public Destinations : 10 Routes : 10 Destination/Mask Proto Pre Cost NextHop Interface 10.1.1.0/30 Direct 0 0 10.1.1.2 Serial0/0/0 10.1.1.1/32 Direct 0 0 10.1.1.1 Serial0/0/0 …… 127.0.0.1/32 Direct 0 0 127.0.0.1 InLoopBack0 172.16.1.1/32 OSPF 10 1563 10.1.2.2 Serial0/0/1 192.168.1.0/24 RIP 100 1 10.1.1.1 Serial0/0/0

  21. 动态路由协议的优点: 可以自动适应网络状态的变化,自动维护路由信息而不用网络管理员的参与。 动态路由协议的缺点: 由于需要相互交换路由信息,需要占用网络带宽,并且要占用系统资源。另外安全性也不如使用静态路由。 动态路由

  22. 静态和动态路由 动态路由 静态路由 • 路由器使用路由协议从其他路由器那里获悉的路由。 • 当网络拓扑发生变化时,路由器会更新路由信息。 • 由网络管理员手工指定的路由。 • 当网络拓扑发生变化时,管理员需要手工更新静态路由。

  23. 1.路由分类 2.直连路由 3.静态路由 4.动态路由 5.缺省路由

  24. 缺省路由 缺省路由是一种特殊的路由,可以通过静态路由配置,某些动态路由协议也可以生成缺省路由,如OSPF和IS-IS。 在路由表中,缺省路由以到网络0.0.0.0(掩码为0.0.0.0)的路由形式出现。 当路由器收到一个目的地在路由表中查找不到的数据包时,会将数据包转发给缺省路由指向的下一跳。

  25. 在路由器B上配置缺省路由 缺省路由配置 RTA RTB 1.1.1.0/24 10.1.1.1/30 20.1.1.1/30 .1 .2 [RTB] ip route-static 0.0.0.0 0.0.0.0 1.1.1.1

  26. 缺省路由 • [RTB] display ip routing-table • Routing Tables: Public • Destinations : 8 Routes : 8 • Destination/Mask Proto Pre Cost NextHop Interface • 0.0.0.0/0 Static 60 0 1.1.1.1 Serial0 • 1.1.1.0/24 Direct 0 0 1.1.1.2 Serial0 • 1.1.1.1/32 Direct 0 0 1.1.1.1 Serial0 • 1.1.1.2/32 Direct 0 0 127.0.0.1 InLoopBack0 • 10.1.1.1/32 Static 60 0 1.1.1.1 Serial0 • 20.1.1.1/32 Direct 0 0 127.0.0.1 InLoopBack0 • 127.0.0.0/8 Direct 0 0 127.0.0.1 InLoopBack0 • 127.0.0.1/32 Direct 0 0 127.0.0.1 InLoopBack0

  27. 小结 • 路由的分类 • 直连路由 • 静态路由 • 动态路由 • 缺省路由

  28. 谢 谢!

More Related