资源描述
,#,单击此处编辑母版标题样式,单击此处编辑母版文本样式,第二级,第三级,杭州华三通信技术有限公司,单击此处编辑母版标题样式,单击此处编辑母版文本样式,第二级,第三级,路由过滤,H3C,大规模网络路由技术,1.0,杭州华三通信技术有限公司 版权所有,未经授权不得使用与传播,路由器在发布与接收路由信息时,可能需要对路由信息进行过滤。,常用的路由过滤工具有,ACL,、地址前缀列表等。,引入,了解路由过滤的目的和作用,掌握路由过滤的原理,掌握过滤工具的种类和特点,掌握地址前缀列表的配置,掌握,filter-policy,的配置和应用,课程目标,学习完本课程,您应该能够:,路由过滤概述,配置静默接口过滤路由,地址前缀列表,Filter-policy,目录,路由过滤的作用,控制路由的传播与生成,节省设备和链路资源消耗,保护网络安全,10.0.0.0/24,10.0.1.0/24,10.0.0.0/24,10.0.1.0/24,10.0.2.0/24,10.0.2.0/24,RTA,RTB,ISP,10.0.0.0/24,路由过滤实施,路由过滤方法,过滤路由协议报文,过滤路由协议报文中携带的路由信息,对,LSDB,计算出的路由信息进行过滤,RIP,路由表,OSPF,路由表,接口,接口,RIP,路由信息,Hello,报文,计算出的路由信息过滤,协议报文中路由信息过滤,路由协议报文过滤,LSDB,路由引入过滤,OSPF,进程,路由过滤工具,静默接口,过滤器,访问控制列表,地址前缀列表,filter-policy,Route-policy,路由过滤概述,配置静默接口过滤路由,地址前缀列表,Filter-policy,目录,配置静默接口,过滤全部路由,RIP,协议中,静默接口不发送路由更新,OSPF,协议中,静默接口不发送,HELLO,报文,10.0.0.0/24,10.0.1.0/24,10.0.0.0/24,10.0.1.0/24,10.0.2.0/24,10.0.2.0/24,RTA,RTB,ISP,静默接口,路由过滤概述,配置静默接口过滤路由,地址前缀列表,Filter-policy,目录,地址前缀列表匹配流程,如果所有表项都是,deny,模式,则任何路由都不能通过该过滤列表,匹配第一条表项,路由信息,匹配第二条表项,匹配最后一条表项,不能通过,通过,Permit,Permit,Deny,Permit,Deny,Deny,路由信息,接收或发送,No,No,No,配置地址前缀列表,Router ip ip-prefix,ip-prefix-name,index,index-number,permit,|,deny,ip-address mask-length,greater-equal,min-mask-length,less-equal,max-mask-length,配置,结果,Permit 10.0.0.0 24,仅匹配,10.0.0.0/24,,不匹配任何其它网络,Permit 10.0.0.0 24 greater-equal 25,匹配,10.0.0.0/24,区间内的掩码大于等于,25,位的网络,如,10.0.0.0/26,、,10.0.0.16/28,、,10.0.0.5/32,等,Permit 10.0.0.0 24 greater-equal 25 less-equal 30,匹配,10.0.0.0/24,区间内的掩码大于等于,25,位但小于等于,30,位的网络,如,10.0.0.0/26,、,10.0.0.16/28,等,Permit 0.0.0.0 0 greater-equal 16 less-equal 24,匹配掩码大于等于,16,但小于等于,24,位的任意网络,Permit 0.0.0.0 0,仅匹配缺省路由,Permit 0.0.0.0 0 less-equal 32,匹配所有路由,配置地址前缀列表示例,配置,结果,ip ip-prefix test permit 10.0.0.0 24 less-equal 32,所有,10.0.0.0/24,范围内的路由通过过滤,其它路由不能通过,ip ip-prefix test index 10 permit 10.0.0.0 24,ip ip-prefix test index 20 permit 11.0.0.0 16,只有路由,10.0.0.0/24,和,11.0.0.0/16,能够通过过滤,其它路由都不能通过,ip ip-prefix test index 10 deny 10.0.0.0 24,ip ip-prefix test index 20 permit 0.0.0.0 0 less-equal 32,只有,10.0.0.0/24,路由不能通过过滤。其它所有路由能够通过,ip ip-prefix test index 10 deny 10.0.0.0 30,ip ip-prefix test index 20 permit 10.0.0.0 24 less-equal 32,除了,10.0.0.0/30,外,,10.0.0.0/24,区间内的其它路由通过过滤。,10.0.0.0/24,区间外的路由不能通过,路由过滤概述,配置静默接口过滤路由,地址前缀列表,Filter-policy,目录,filter-policy,通过与,ACL,、地址前缀列表结合使用,,filter-policy,可对路由信息进行过滤,10.0.0.0/24,10.0.1.0/24,10.0.0.0/24,10.0.2.0/24,RTA,RTB,用,filter-policy,过滤从,RTA,发来的路由信息,RTC,RTD,11.0.0.1/24,11.0.0.2/24,11.0.0.3/24,10.0.1.0/24,10.0.2.0/24,10.0.1.0/24,10.0.2.0/24,ISP,用,filter-policy,过滤,RIP,路由,接收路由过滤,对进入,RIP,路由表的路由信息进行过滤,发送路由过滤,对所发送的,RIP,路由信息进行过滤,RIP,路由表,IP,路由表,接口,接口,路由信息,路由信息,接收路由过滤,发送路由过滤,配置,filter-policy,过滤,RIP,路由,Router-rip-1 filter-policy,acl-number,|gateway,ip-prefix-name,|ip-prefix,ip-prefix-name,gateway,ip-prefix-name,import,interface-type interface-number,对接收的路由进行过滤,对发送的路由进行过滤,Router-rip-1 filter-policy,acl-number,|,ip-prefix,ip-prefix-name,export,protocol,process-id,interface-type,interface-number,filter-policy,过滤接收路由示例,RTB ip ip-prefix abc index 10 deny 10.0.1.0 24,RTB ip ip-prefix abc index 20 deny 10.0.2.0 24,RTB ip ip-prefix abc index 30 permit 0.0.0.0 0 less-equal 32,RTB rip 100,RTB-rip-100 filter-policy ip-prefix abc import,10.0.0.0/24,10.0.1.0/24,10.0.0.0/24,10.0.1.0/24,10.0.2.0/24,10.0.2.0/24,RTA,RTB,ISP,10.0.0.0/24,filter-policy,过滤发送路由示例,10.0.0.0/24,10.0.1.0/24,10.0.0.0/24,10.0.1.0/24,10.0.2.0/24,10.0.2.0/24,RTA,RTB,ISP,10.0.0.0/24,RTB acl number 2000,RTB-acl-basic-2000 rule deny source 10.0.1.0 0.0.0.255,RTB-acl-basic-2000 rule deny source 10.0.2.0 0.0.0.255,RTB-acl-basic-2000 rule permit,RTB rip 100,RTB-rip-100 filter-policy 2000 export,用,filter-policy,过滤,OSPF,和,IS-IS,路由,过滤计算出的路由,而非过滤,LSA,对,OSPF,或,IS-IS,计算出来的路由进行过滤,只有通过过滤的路由才被添加到路由表中,LSDB,路由表,接口,接口,LSA,LSA,入路由表过滤,对,OSPF,计算出的路由进行过滤,对,IS-IS,计算出的路由进行过滤,配置,filter-policy,过滤,OSPF,及,IS-IS,路由,Router-ospf-1 filter-policy,acl-number,gateway,ip-prefix-name,|gateway,ip-prefix-name,|ip-prefix,ip-prefix-name,gateway,ip-prefix-name,import,Router-isis-1 filter-policy,acl-number,|ip-prefix,ip-prefix-name,import,利用路由过滤可控制路由在网络内传播,ACL,和地址前缀列表可用于路由信息的识别,地址前缀列表比,ACL,更加灵活,可利用,filter-policy,工具在,RIP,、,OSPF,、,IS-IS,等协议内过滤路由,本章总结,
展开阅读全文