1 / 43

中职职业技能大赛培训

中职职业技能大赛培训. 三层路由技术. 本章内容. VRRP 协议 RIP 路由协议 OSPF 路由协议 路由重分发 三层交换实现路由功能. 课程议题. VRRP 协议. 什么是 VRRP. 什么是 VRRP ? VRRP(Virtual Router Redundancy Protocol) : 虚拟路由冗余协议 是用于实现路由器冗余的协议,最新协议在 RFC3768 中定义。 VRRP 的定义

tamah
Download Presentation

中职职业技能大赛培训

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. 本章内容 • VRRP协议 • RIP路由协议 • OSPF路由协议 • 路由重分发 • 三层交换实现路由功能

  3. 课程议题 VRRP协议

  4. 什么是VRRP • 什么是VRRP? • VRRP(Virtual Router Redundancy Protocol):虚拟路由冗余协议是用于实现路由器冗余的协议,最新协议在RFC3768中定义。 • VRRP的定义 • 在该协议中,对共享多存取访问介质(如以太网)上终端IP设备的默认网关(Default Gateway)进行冗余备份,从而在其中一台路由设备宕机时,备份路由设备及时接管转发工作,向用户提供透明的切换,提高了网络服务质量。

  5. VRRP术语 • VRRP路由器 • 是指运行VRRP的路由器,是物理实体。 • 虚拟路由器 • 是指VRRP协议创建的,是逻辑概念。 • 主控路由器和备份路由器 • 一个VRRP组中有且只有一台处于主控角色的路由器,可以有一个或者多个处于备份角色的路由器。 • VRRP协议使用选择策略从路由器组中选出一台作为主控,负责ARP响应和转发IP数据包,组中的其它路由器作为备份的角色处于待命状态。

  6. VRRP术语

  7. VRRP组 • VRRP控制报文只有一种:VRRP通告(advertisement)。它使用IP多播数据包进行封装,组地址为224.0.0.18,发布范围只限于同一局域网内。IP协议号为112;IP包的TTL值必须为255。

  8. VRRP状态 • 组成虚拟路由器的路由器会有三种状态 • Initialize • Master • Backup

  9. VRRP选举 • VRRP的路由器都会发送和接收VRRP通告消息 • VRRP优先级 • 接口的IP地址

  10. VRRP配置命令 Switch(config-if)# vrrpgrou- number ipIP-addresssecondary • 配置VRRP组 • 命令参数如下表

  11. VRRP基本配置示例

  12. VRRP基本配置示例(续) • 使用命令show vrrp brief 来查看VRRP组的状态

  13. 调整VRRP优先级 Switch(config-if)# vrrpgroup-numberprioritypriority-value • 配置VRRP组优先级 • 其中参数Priority-value的取值范围为0~254,0是系统保留给ADVERTISEMENT报文专,255是保留给IP 地址拥有者只有当VRRP路由器的IP地址和虚拟路由器的接口相同时,则其优先级为255。

  14. VRRP监控与维护 Switch# debug vrrp all • 打开VRRP出错提示、VRRP事件、VRRP报文、以及状态提示开关。 Switch# show vrrp • 显示VRRP的概况或细节 Switch# show vrrp interface • 显示指定接口上的VRRP组情况

  15. 课程议题 RIP协议

  16. 路由信息协议-RIP • RIP协议概述 • RIP(RoutingInformationProtocols,路由信息协议),是应用较早、使用较普遍的内部网关协议(Interior Gateway Protocol,简称IGP),适用于小型同类网络,是典型的距离矢量(distance-vector)协议 • RIP是基于UDP,端口520的应用层协议

  17. RIP路由协议的版本 • RIPv1 • 有类路由协议,不支持VLSM • 以广播的形式发送更新报文 • 不支持认证 • RIPv2 • 无类路由协议,支持VLSM • 以组播的形式发送更新报文 • 支持明文和MD5的认证

  18. 配置RIP协议 • 配置步骤 1、开启RIP路由协议进程 • Router(config)#router rip 2、申请本路由器参与RIP协议的直连网段信息 • Router(config-router)#network 192.168.1.0 3、指定RIP协议的版本2(默认是version1) • Router(config-router)#version 2 4、在RIPv2版本中关闭自动汇总 • Router(config-router)#no auto-summary

  19. 查看RIP配置信息 • 验证 RIP的配置 • Router#show ip protocols • 显示路由表的信息 • Router#show ip route • 清除 IP路由表的信息 • Router#clear ip route • 在控制台显示 RIP的工作状态 • Router#debug ip rip

  20. 配置示例

  21. 课程议题 OSPF路由协议

  22. OSPF协议简介 • OSPF路由协议: • 开放式最短路径优先协议(Open Shortest Path First ),是由IETF开发的路由选择协议 • OSPF路由协议是一个链路状态协议,其使用最短路径优先算法(SPF)计算路由。同时,它是一个开发的协议 • 目前共有三个版本: • OSPFv1 测试版本,仅在实验平台使用 • OSPFv2 发行版本,目前使用的都是这个版本 • OSPFv3 测试版本,提供对IPv6的路由支持

  23. OSPF协议 • OSPF协议的特点: • 可适应大规模网络 • 路由变化收敛速度快 • 无路由自环 • 支持变长子网掩码VLSM • 支持等值路由 • 支持区域划分 • 提供路由分级管理 • 支持验证 • 支持以组播地址发送协议报文

  24. OSPF基本配置 Router(config)# router ospf process-id • 创建OSPF路由进程 Router(config-router)# network network wildcard area area-id • 定义接口所属区域

  25. 配置OSPF接口参数 Router(config-if)# ip ospf cost cost • 指定该接口的花费 Router(config-if)# ip ospf retransmit-interval seconds • 定义OSPF链路状态通告重传时间间隔 Router(config-if)# ip ospf transmit-delay seconds • 设置OSPF发送一个更新报文的时间

  26. 配置OSPF接口参数(续) Router(config-if)# ip ospf priority priority • 设置OSPF优先值,用于确定指定路由器 Router(config-if)# ip ospf hello-interval seconds • 设置发送hello报文时间间隔 Router(config-if)# ip ospf dead-interval seconds • 设置无效时间间隔,在该时间内如果没接收到邻居的hello报文,则宣告邻居无效

  27. 配置Router ID Router(config)# interface loopback number • 创建环回接口 Router(config-if)# ip address address mask • 配置IP地址 Router(config-router)# router-id ip-address • 指定Router ID

  28. 单区域配置示例

  29. 多区域配置示例

  30. 课程议题 路由重发布

  31. 路由重发布的作用 • 路由重分发是指连接到不同路由选择域的边界路由器,在不同路由选择域(自主系统)之间交换和通告路由选择信息的能力。

  32. RIP协议的redistribute命令 • redistributeprotocol [ metricmetric-value] [ match internal | external nssa-external type] [route-mapmap-tag]

  33. OSPF协议的redistribute命令 • redistributeprotocol [ metricmetric-value ] [ metric-type {1|2} ] [ tag tag-value ] [ route-mapmap-tag ]

  34. 重分发直连路由、静态路由和默认路由 • redistribute connected[ metric metric-value ] • redistribute connected[ subnets ] [ metricmetric-value ] [ metric-type { 1 | 2 } ] [ tagtag-value ] [ route-mapmap-tag ] • redistribute static[ metricmetric-value ] • redistribute static[ subnets ] [ metricmetric-value ] [ metric-type { 1 | 2 } ] [ tagtag-value ] [ route-mapmap-tag ] • default-information originate [ route-maproute-map-name ] • default-information originate [ always ] [ metricmetric-value ] [ metric-type type-value ] [ route-mapmap-name ]

  35. 重分发直连路由、静态路由和默认路由示例

  36. 课程议题 三层交换机的路由配置

  37. 三层交换的路由功能 • 三层交换机默认开启路由功能 • Switch(config)#ip routing (开启三层交换机路由功能) • 三层交换机配置路由接口的两种方法 • 开启三层交换机物理接口的路由功能 • Switch(config)#interface fastethernet 0/5 • Switch(config-if)#no switchport • Switch(config-if)#ip address 192.168.1.1 255.255.255.0 • Switch(config-if)#no shutdown • 关闭物理接口路由功能 • Switch(config-if)# switchport • 采用SVI方式(switch virtual interface) • Switch(config)#interface vlan 10 • Switch(config-if)#ip address 192.168.1.1.255 255.255.0 • Switch(config-if)#no shutdown

  38. F0/10 F1/0 三层交换机和路由器相连的网络 • 方法一(SVI): • Switch(config)#interface f0/10 • Switch(config-if)#switchport access vlan 10 • Switch(config-if)#exit • Switch(config)#interface vlan 10switch(config-if)#ip address 192.168.10.1 255.255.255.0 • Switch(config-if)#no shutdown

  39. F0/10 F1/0 三层交换机和路由器相连的网络(续) • 方法二(路由接口): • Switch(config)#interface f0/10 • Switch(config-if)#no switchport • Switch(config-if)#ip address 192.168.10.1 255.255.255.0 • Switch(config-if)#no shutdown

  40. 三层交换机路由协议的配置 • 静态路由 • Switch(config)#ip route x.x.x.x x.x.x.x [x.x.x.x/interface] • RIP • Switch(config)#router rip • Switch(config-router)#network X.X.X.X • Switch(config-router)#version 2 • 注:三层交换机不支持no auto-summary • OSPF • Switch(config)#router ospf • Switch(config)#network X.X.X.X X.X.X.X area x

  41. 查看三层交换机路由配置 • 查看路由接口信息 • Switch#show ip interface • 查看路由表 • Switch#show ip route • 查看动态路由协议 • Switch#show ip rip • Switch#show ip ospf

  42. 课程回顾 • VRRP协议 • RIP路由协议 • OSPF路由协议 • 路由重分发 • 三层交换实现路由功能

  43. Q&A

More Related