




已阅读5页,还剩45页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
第二十一章路由优化 本章提要 1 路由优化的知识要点2 分布控制列表控制路由更新3 基于源IP地址的策略路由4 基于报文大小的策略路由5 基于应用的策略路由 知识要点 路由优化概述 在当今高性能的网络中 为了保证网络的伸缩性 稳定性 安全性和快速收敛 必须对网络进行优化 路由过滤和策略路由是路由优化的常用方法 分布控制列表 策略路由 1 策略路由提供了根据网络管理者制定的标准来进行数据包转发的一种机制 2 基于策略的路由比传统路由能力更强 使用更灵活 它使网络管理者不仅能够根据目的地址而且能够根据协议类型 报文大小 应用或IP源地址来选择转发路径 3 策略路由的策略由路由映射图 routemap 来定义 策略路由的优点 1 可以实现基于源 Source based 的路由选择 2 实现更好的QoS控制 3 实现负载分担 定义策略 路由映射 routemap 命令被用于定义策略 一个路由映射由拥有相同route map名的route map陈述 statement 集合构成 route mapmap tag permit deny sequence number match set 1 map tag是routemap的名字或ID 2 参数permit和deny指定了如果条件匹配将执行的动作 3 sequence number定义了检查的顺序 用于区分每一个route mapstatement 不同的statement拥有不同的sequencenumber 4 一个routemap可以包含多个routemapstatement 这些语句的执行顺序像ACL一样是从上到下 5 一个routemap的最后默认 denyany match与set matchconditionsmatchinterfacematchipaddressmatchnext hopmatchiproute sourcematchmetricmatchroute typematchtag setconditionssetinterfacesetdefaultinterfacesetipdefaultnext hopsetmetricsetmetric typesetnext hopsetweight setiptos setipprecedence 实验1用分布控制列表控制路由更新 实验目的 1 被动接口的配置 2 分布控制列表的配置 实验拓扑 实验设计 1 本实验通过使用分布控制列表控制路由器R1只发送环回接口中第三位为奇数的路由和g0 0接口的路由更新给R2 在串口的出方向应用分布控制列表 2 整个网络运行RIPv2路由协议实现IP的连通性 3 将路由器R1的所有接口设置为被动接口 然后再把串口设置为 nopassive 实验步骤 1 配置路由器R1 R1 config access list1permit172 16 1 0R1 config access list1permit1 1 1 00 0 254 0 允许第三位为奇数的路由R1 config routerripR1 config router version2R1 config router noauto summaryR1 config router network1 0 0 0R1 config router network172 16 0 0R1 config router network192 168 12 0R1 config router passive interfacedefault 默认为被动接口R1 config router nopassive interfaceSerial0 0 0 关闭被动接口R1 config router distribute list1outSerial0 0 0 出方向配置分布控制列表 实验步骤 2 配置路由器R2 R2 config routerripR2 config router version2R2 config router noauto summaryR2 config router network2 0 0 0R2 config router network192 168 12 0 技术要点 distribute list 命令可以全局的在一个出或入方向的路由更新中过滤路由 每个路由进程允许一个入方向和一个出方向全局性发布列表 也可以为一个路由进程所涉及到的每一个接口的入方向和出方向设置过滤 实验调试 1 R2 showiprouterip1 0 0 0 24issubnetted 4subnetsR1 1 1 0 120 1 via192 168 12 1 00 00 01 Serial0 0 0R1 1 3 0 120 1 via192 168 12 1 00 00 01 Serial0 0 0R1 1 5 0 120 1 via192 168 12 1 00 00 01 Serial0 0 0R1 1 7 0 120 1 via192 168 12 1 00 00 01 Serial0 0 0172 16 0 0 24issubnetted 1subnetsR172 16 1 0 120 1 via192 168 12 1 00 00 01 Serial0 0 0 以上输出表明路由器R2只收到R1的以太口和第三位为奇数的环回接口的路由 实验调试 2 R1 showipprotocolsRoutingProtocolis rip Sendingupdatesevery30seconds nextduein2secondsInvalidafter180seconds holddown180 flushedafter240OutgoingupdatefilterlistforallinterfacesisnotsetSerial0 0 0filteredby1 per user defaultis1IncomingupdatefilterlistforallinterfacesisnotsetRedistributing ripDefaultversioncontrol sendversion2 receiveversion2 实验2基于源IP地址的策略路由 实验目的 1 用route map定义路由策略 2 在接口下应用路由策略 3 基于源IP地址的策略路由的调试 实验拓扑 实验设计 本实验设计如下 在路由器R1的g0 0接口应用IP策略路由CCNA 使得从主机A来的数据设置下一跳地址为192 168 12 2 从主机B来的数据设置下一跳地址为192 168 21 2 所有其它的数据包正常转发 整个网络运行EIGRP路由协议确保网络的连通性 实验步骤 1 配置路由器R1 R1 config access list1permit10 1 1 2R1 config access list2permit10 1 1 3R1 config route mapCCNApermit10R1 config route map matchipaddress1R1 config route map setipnext hop192 168 12 2R1 config route mapCCNApermit20R1 config route map matchipaddress2R1 config route map setipnext hop192 168 21 2R1 config interfaceg0 0R1 config if ippolicyroute mapCCNAR1 config routereigrp1R1 config router noauto summaryR1 config router network10 1 1 0255 255 255 0R1 config router network192 168 12 0R1 config router network192 168 21 0 实验调试 1 主机A上ping地址2 2 2 2 路由器R1上显示的调试信息如下 R1 debugippolicy Feb2000 18 33 368 IP s 10 1 1 2 GigabitEthernet0 0 d 2 2 2 2 len60 policymatch Feb2000 18 33 368 IP routemapCCNA item10 permit Feb2000 18 33 372 IP s 10 1 1 2 GigabitEthernet0 0 d 2 2 2 2 Serial0 0 0 len60 policyrouted Feb2000 18 36 381 IP GigabitEthernet0 0toSerial0 0 0192 168 12 2 以上输出信息表明源地址为10 1 1 2的主机发送给目的主机2 2 2 2的数据包在接口 GigabitEthernet0 0 匹配route mapCCNA的序列号10所定义的策略 执行策略路由 设置数据包下一跳地址为192 168 12 2 实验调试 2 主机B上ping地址2 2 2 2 路由器R1上显示的调试信息如下 Feb2000 21 12 449 IP s 10 1 1 3 GigabitEthernet0 0 d 2 2 2 2 len60 policymatch Feb2000 21 12 449 IP routemapCCNA item20 permit Feb2000 21 12 453 IP s 10 1 1 3 GigabitEthernet0 0 d 2 2 2 2 Serial0 0 1 len60 policyrouted Feb2000 21 12 453 IP GigabitEthernet0 0toSerial0 0 1192 168 21 2 以上输出信息表明源地址为10 1 1 3的主机发送给目的主机2 2 2 2数据包在接口 GigabitEthernet0 0 匹配route mapCCNA的序列号20所定义的策略 执行策略路由 设置数据包下一跳地址为192 168 21 2 实验调试 3 在主机10 1 1 6上ping地址2 2 2 2 路由器R1上显示的调试信息如下 Feb2000 14 17 416 IP s 10 1 1 6 GigabitEthernet0 0 d 2 2 2 2 Serial0 0 0 len60 policyrejected normalforwarding 以上输出信息表明源地址为10 1 1 6的主机发送到目的主机2 2 2 2数据包在接口 GigabitEthernet0 0 不匹配路由策略 数据包正常转发 实验调试 4 R1 showippolicyInterfaceRoutemapGi0 0CCNA 实验3基于报文大小的策略路由 实验目的 1 用route map定义路由策略 2 在接口下应用路由策略 3 基于报文大小的策略路由的调试 实验拓扑 实验设计 本实验设计如下 在路由器R1的g0 0接口应用IP策略路由CCNP 使得对大小为64 100字节的数据包设置出接口为s0 0 0 大小为101 1000字节的数据包设置出接口为s0 0 1 所有其它的数据包正常转发 整个网络运行EIGRP路由协议确保网络的连通性 实验步骤 1 配置路由器R1 R1 config route mapCCNPpermit10R1 config route map matchlength64100R1 config route map setinterfaces0 0 0R1 config route mapCCNPpermit20R1 config route map matchlength1011000R1 config route map setinterfaces0 0 1R1 config interfaceg0 0R1 config if ippolicyroute mapCCNPR1 config iplocalpolicyroute mapCCNPR1 config routereigrp1R1 config router noauto summaryR1 config router network10 1 1 0255 255 255 0R1 config router network192 168 12 0R1 config router network192 168 21 0 技术要点 在接口下应用的策略路由对路由器本地产生的数据包不起作用 如果需要对本地路由器产生的数据包执行策略路由 要用 iplocalpolicyroute map 命令配置本地策略 实验调试 1 执行扩展ping命令 数据包的长度为90 源地址为10 1 1 6 路由器R3的以太口地址 R1 debugippolicy Feb2020 57 06 535 IP s 10 1 1 6 GigabitEthernet0 0 d 2 2 2 2 len90 FIBpolicymatch Feb2020 57 06 535 IP s 10 1 1 6 GigabitEthernet0 0 d 2 2 2 2 Serial0 0 0 len90 FIBpolicyrouted 以上输出信息表明长度为90字节的数据包在接口 GigabitEthernet0 0 匹配策略 执行策略路由 设置数据包出接口为s0 0 0 实验调试 2 执行扩展ping命令 数据包的长度为300 源地址为10 1 1 6 路由器R1上显示的调试信息如下 Feb2020 58 39 311 IP s 10 1 1 6 GigabitEthernet0 0 d 2 2 2 2 len300 FIBpolicymatch Feb2020 58 39 311 IP s 10 1 1 6 GigabitEthernet0 0 d 2 2 2 2 Serial0 0 1 len300 FIBpolicyrouted 以上输出信息表明长度为300字节的数据包在接口 GigabitEthernet0 0 匹配策略 执行策略路由 设置数据包出接口为s0 0 1 实验调试 3 执行扩展ping命令 数据包的长度为1200 源地址为10 1 1 6 路由器R1上显示的调试信息如下 Feb2021 01 20 583 IP s 10 1 1 6 GigabitEthernet0 0 d 2 2 2 2 len1200 FIBpolicyrejected nomatch normalforwarding 以上输出信息表明长度为1200字节的数据包在接口 GigabitEthernet0 0 不匹配路由策略 数据包正常转发 实验调试 4 R1 showippolicyInterfaceRoutemaplocalCCNPGi0 0CCNP 实验调试 5 R1 showroute maproute mapCCNP permit sequence10Matchclauses length64100Setclauses interfaceSerial0 0 0Policyroutingmatches 3packets 292bytesroute mapCCNP permit sequence20Matchclauses length1011000Setclauses interfaceSerial0 0 1Policyroutingmatches 1packets 314bytes 实验4基于应用的策略路由 实验目的 1 用route map定义路由策略 2 在接口下应用路由策略 3 基于应用的策略路由的调试 实验拓扑 实验设计 本实验设计如下 在路由器R1的g0 0接口应用IP策略路由CCIE 使得对HTTP数据包设置下一跳地址为192 168 12 2 并且设置IP数据包优先级为flash 为Telnet数据包设置下一跳地址为192 168 21 2 并且设置IP数据包优先级为critical 所有其它的数据包正常转发 整个网络运行EIGRP路由协议确保网络的连通性 实验步骤 1 配置路由器R1 R1 config ipaccess listextendedHTTPR1 config ext nacl permittcpanyanyeq80R1 config ipaccess listextendedTELNETR1 config ext nacl permittcpanyanyeq23R1 config route mapCCIEpermit10R1 config route map matchipaddressHTTPR1 config route map setipprecedenceflashR1 config route map setipnext hop192 168 12 2R1 config route mapCCIEpermit20R1 config route map matchipaddressTELNETR1 config route map setipprecedencecriticalR1 config route map setipnext hop192 168 21 2R1 config interfaceg0 0R1 config if ippolicyroute mapCCIER1 config iplocalpolicyroute mapCCIER1 config routereigrp1R1 config router noauto summaryR1 config router network10 1 1 0255 255 255 0R1 config router network192 168 12 0R1 config router network192 168 21 0 实验步骤 2 配置路由器R2 R2 config routereigrp1R2 config router network2 2 2 00 0 0 255R2 config router network192 168 12 0R2 config router network192 168 21 0R2 config router noauto summaryR2 config iphttpserverR2 config linevty04R2 config line nolo
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 学校年级团建活动方案策划
- 工地建筑围挡搭建方案设计
- 咨询目标方案
- 游泳馆营销活动方案六一
- 大洼装修方案咨询热线
- 建筑师方案设计作图
- 社团活动策划创意方案
- 媒体广告行业市场竞争环境研究报告
- 企业运营效率提升措施方案框架
- 2025导游资格考试能力提升B卷题库附参考答案详解(基础题)
- 2025年贵州省凯里市辅警招聘考试题题库(含参考答案)
- 大数据产业课件
- 潮汐能发电站课件
- 国际化跨国经营中的伦理问题概述
- 2025-2026学年度武汉市部分学校高三年级九月调研考试 语文试卷(含标准答案)
- 2025年禁毒知识竞赛试题及参考答案
- 初二入团考试内容及答案
- 针灸科感控知识培训课件
- 2025年秋期新部编人教版五年级上册道德与法治教学计划+进度表
- 2025年全国企业员工全面质量管理知识竞赛题库及答案
- 粮食机收减损培训课件
评论
0/150
提交评论