网络互联PPT情境3路由技术_5路由重分布和路由优化
合集下载
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
Match语句为空,表示match所有.
26
set 命令
Router(config-route-map)# set action
set as-path set default interface set interface set ip default next-hop set ip next-hop set local-preference set metric set metric-type set tag set weight
28
3.5.3 分布列表(Distribute List)
29
使用Distribute List
分布列表(Distribute List)提供控制路由更新的一种方法,通常与ACL、 路由映射图或者前缀列表结合使用.
30
过滤入向路由更新
Router(config-router)#
distribute-list {access-list-number | name} [route-map map-tag] in [interface-type interface-number]
默认度量值为无限大
16
重分布进RIP实例
17
配置重分布进OSPF
RtrA(config)# router ospf 1 RtrA(config-router)# redistribute eigrp ?
<1-65535> Autonomous system number RtrA(config-router)# redistribute eigrp 100 ?
set语句为空,表示不执行任何set
27
用Route Map防止路由回馈
RIPv2
R 192.168.1.0 [120/1]
R3
OSPF Area 0
O E2 192.168.1.0 [110/20]
R1
O E2 192.168.1.0 [110/20]
R2
R1(config)# access-list 1 permit 192.168.1.0 0.0.0.255 R1(config)# route-map OSPF-into-RIP deny 10 R1(config-route-map)# match ip address 1 R1(config)# route-map OSPF-into-RIP permit 20 R1(config-route-map)# router rip R1(config-router)# redistribute ospf 10 metric 5 route-map OSPF-into-RIP R1(config-router)# router ospf 10 R1(config-router)# redistribute rip subnets
BGP为1,其它为20
IS-IS
0
BGP
IGP的度量值
8
带种子度量的重分布
9
重分布部署考虑的问题
• 路由反馈和次优路由 • 路由信息不兼容,所以要配置种子度量值 • 不一致的收敛时间
10
单点重分布
11
多点重分布
12
单向重分布问题
次优路由
13
单向多点重分布问题
次优路由和路由环路
14
重分布支持所有协议
– 多厂商协作 – 基于主机的路由器
6
重分布路由信息
7
使用种子度量值
• 当重分布的时候,使用“default-metric”命令为路由条目设置种子度 量值
• 一旦兼容的度量值被设置,度量值就像其他任何的路由条目一样增加
执行路由重分布进的路由协议 默认种子度量值
RIP
无限大
EIGRP
无限大
OSPF
RtrA(config)#router rip
RtrA(config-router)#redistribute ?
ቤተ መጻሕፍቲ ባይዱbgp
Border Gateway Protocol (BGP)
connected Connected
eigrp
Enhanced Interior Gateway Routing Protocol (EIGRP)
参数 access-listnumber | name map-tag
in
描述 ACL表号或名称 路由映射图的名称,只有OSPF和EIGRP支持该参数。 分布列表作用的方向
interface-type interface-number
接口类型和编号
31
过滤入向路由更新
Define a filter for outgoing routing updates.
24
Route-Map 操作
route-map my_bgp permit 10 :: :: :: { match statements } :: :: :: { set statements }
route-map my_bgp deny 20 :: :: :: :: :: ::
route-map my_bgp permit 30 :: :: :: :: :: ::
23
定义 Route Map
Router(config)# route-map map-tag [permit | deny] [sequence-number]
参数 map-tag
描述 route map名字,名字区分大小写
permit | deny sequence-number
参数permit和deny指定了如果条件匹配将执行的动作,默认是 permit
metric metric-type route-map subnets tag
…
<cr>
Metric for redistributed routes OSPF/IS-IS exterior metric type for redistributed routes Route map reference Consider subnets for redistribution into OSPF Set tag for routes redistributed into OSPF
21
3.5.2 路由映射图(Route-map)
22
理解 Route Map
像复杂的ACL • 自顶向下执行 • 一旦匹配策略,立刻离开Route Map 线性的编序方式方便插入或者删除操作 Match 和 set 成对的使用时,就像编程语言中的 if, then
Route Map使用场合: • 路由重分布时路由过滤 • 策略路由(PBR) • NAT • BGP
R1
R1(config-router)# distribute-list in Filter incoming routing updates R1
33
用Distribute List实现路由更新过滤
EIGRP AS 1 10.0.0.0
172.16.0.0
R1
D 10.0.0.0/8 [90/...]
rip
Routing Information Protocol (RIP)
route-map Route map reference
static
Static routes
<cr>
15
配置重分布进RIP
RtrA(config)# router rip RtrA(config-router)# redistribute ospf ?
<1-65535> Process ID RtrA(config-router)# redistribute ospf 1 ?
match metric route-map
…
<cr>
Redistribution of OSPF routes Metric for redistributed routes Route map reference
定义了检查的顺序,用于区分每一个路由映射图陈述,不同的陈 述拥有不同的序号。通过这个参数可以在一个路由映射图的特定 位置插入或删除一条route map陈述,并且可以单独编辑,如果不 指定序号,则默认为10。
• 一个路由映射图的最后默认deny any。 • 如果是在策略路由中使用路由映射图,一个数据包不满足策略,它会按照目的地址 正常路由转发. • 在路由重分布中使用路由映射图,如果路由条目不满足策略,则被过滤。 • 在删除路由映射图陈述的时候,如果不指定陈述的编号,则删除整个路由映射图。
学习情境3 路由技术
深圳职业技术学院电子与通信工程学院
1
学习目标
2
3.5 路由重分布和路由优化
3
教学目标
1. 种子度量值和路由重分布 2. 路由映射表 3.分布列表 4.前缀列表 5. 策略路由 6. IP SLA
4
3.5.1 路由重分布
5
使用多种路由协议
• 不可能所有网络都运行一种路由协议 • 政治问题-部门之间没有很好的协作 • 多厂商设备的不匹配
描述 ACL表号或名称 分布列表作用的方向
interface-name
接口类型和编号
routing-process 路由进程号码
routing-process parameter
路由进程号码
32
distribute-list out Or in
R1(config-router)# distribute-list out Filter outgoing routing updates
isis
ISO IS-IS
iso-igrp IGRP for OSI networks
metric
Metric for redistributed routes
mobile
Mobile routes
odr
On Demand stub Routes
ospf
Open Shortest Path First (OSPF)
match metric route-map
…
<cr>
Redistribution of OSPF routes Metric for redistributed routes Route map reference
默认度量值为无限大
20
重分布进EIGRP 实例
• 带宽:Bandwidth in kilobytes = 10000 • 延迟:Delay in tens of microseconds = 100 • 可靠性:Reliability = 255 (maximum) • 负载:Load = 1 (minimum) • 最大传输单元:MTU = 1500 bytes
logical OR
logical AND
25
match 命令
Router(config-route-map)# match condition
match community match interface match ip address match ip next-hop match ip route-source match length match metric match route-type match tag
• 默认度量值20 • 默认度量类型为2 • 默认子网信息不重分布
18
重分布进OSPF实例
19
重分布进EIGRP
RtrA(config)# router eigrp 100 RtrA(config-router)# redistribute ospf ?
<1-65535> Process ID RtrA(config-router)# redistribute ospf 1 ?
192.168.5.0
R2 S0/0/0
R3
D 172.16.0.0/16 [90/...] D 10.0.0.0/8 [90/...]
R2(config)# access-list 7 permit 172.16.0.0 0.0.255.255 R2(config)# R2(config)# router eigrp 1 R2(config-router)# network 172.16.0.0 R2(config-router)# network 192.168.5.0 R2(config-router)# distribute-list 7 out Serial0/0/0 R2(config-router)#
Router(config-router)#
distribute-list {access-list-number | name} out [interface-name | routing-process [routing-process parameter]]
参数
access-listnumber | name out
26
set 命令
Router(config-route-map)# set action
set as-path set default interface set interface set ip default next-hop set ip next-hop set local-preference set metric set metric-type set tag set weight
28
3.5.3 分布列表(Distribute List)
29
使用Distribute List
分布列表(Distribute List)提供控制路由更新的一种方法,通常与ACL、 路由映射图或者前缀列表结合使用.
30
过滤入向路由更新
Router(config-router)#
distribute-list {access-list-number | name} [route-map map-tag] in [interface-type interface-number]
默认度量值为无限大
16
重分布进RIP实例
17
配置重分布进OSPF
RtrA(config)# router ospf 1 RtrA(config-router)# redistribute eigrp ?
<1-65535> Autonomous system number RtrA(config-router)# redistribute eigrp 100 ?
set语句为空,表示不执行任何set
27
用Route Map防止路由回馈
RIPv2
R 192.168.1.0 [120/1]
R3
OSPF Area 0
O E2 192.168.1.0 [110/20]
R1
O E2 192.168.1.0 [110/20]
R2
R1(config)# access-list 1 permit 192.168.1.0 0.0.0.255 R1(config)# route-map OSPF-into-RIP deny 10 R1(config-route-map)# match ip address 1 R1(config)# route-map OSPF-into-RIP permit 20 R1(config-route-map)# router rip R1(config-router)# redistribute ospf 10 metric 5 route-map OSPF-into-RIP R1(config-router)# router ospf 10 R1(config-router)# redistribute rip subnets
BGP为1,其它为20
IS-IS
0
BGP
IGP的度量值
8
带种子度量的重分布
9
重分布部署考虑的问题
• 路由反馈和次优路由 • 路由信息不兼容,所以要配置种子度量值 • 不一致的收敛时间
10
单点重分布
11
多点重分布
12
单向重分布问题
次优路由
13
单向多点重分布问题
次优路由和路由环路
14
重分布支持所有协议
– 多厂商协作 – 基于主机的路由器
6
重分布路由信息
7
使用种子度量值
• 当重分布的时候,使用“default-metric”命令为路由条目设置种子度 量值
• 一旦兼容的度量值被设置,度量值就像其他任何的路由条目一样增加
执行路由重分布进的路由协议 默认种子度量值
RIP
无限大
EIGRP
无限大
OSPF
RtrA(config)#router rip
RtrA(config-router)#redistribute ?
ቤተ መጻሕፍቲ ባይዱbgp
Border Gateway Protocol (BGP)
connected Connected
eigrp
Enhanced Interior Gateway Routing Protocol (EIGRP)
参数 access-listnumber | name map-tag
in
描述 ACL表号或名称 路由映射图的名称,只有OSPF和EIGRP支持该参数。 分布列表作用的方向
interface-type interface-number
接口类型和编号
31
过滤入向路由更新
Define a filter for outgoing routing updates.
24
Route-Map 操作
route-map my_bgp permit 10 :: :: :: { match statements } :: :: :: { set statements }
route-map my_bgp deny 20 :: :: :: :: :: ::
route-map my_bgp permit 30 :: :: :: :: :: ::
23
定义 Route Map
Router(config)# route-map map-tag [permit | deny] [sequence-number]
参数 map-tag
描述 route map名字,名字区分大小写
permit | deny sequence-number
参数permit和deny指定了如果条件匹配将执行的动作,默认是 permit
metric metric-type route-map subnets tag
…
<cr>
Metric for redistributed routes OSPF/IS-IS exterior metric type for redistributed routes Route map reference Consider subnets for redistribution into OSPF Set tag for routes redistributed into OSPF
21
3.5.2 路由映射图(Route-map)
22
理解 Route Map
像复杂的ACL • 自顶向下执行 • 一旦匹配策略,立刻离开Route Map 线性的编序方式方便插入或者删除操作 Match 和 set 成对的使用时,就像编程语言中的 if, then
Route Map使用场合: • 路由重分布时路由过滤 • 策略路由(PBR) • NAT • BGP
R1
R1(config-router)# distribute-list in Filter incoming routing updates R1
33
用Distribute List实现路由更新过滤
EIGRP AS 1 10.0.0.0
172.16.0.0
R1
D 10.0.0.0/8 [90/...]
rip
Routing Information Protocol (RIP)
route-map Route map reference
static
Static routes
<cr>
15
配置重分布进RIP
RtrA(config)# router rip RtrA(config-router)# redistribute ospf ?
<1-65535> Process ID RtrA(config-router)# redistribute ospf 1 ?
match metric route-map
…
<cr>
Redistribution of OSPF routes Metric for redistributed routes Route map reference
定义了检查的顺序,用于区分每一个路由映射图陈述,不同的陈 述拥有不同的序号。通过这个参数可以在一个路由映射图的特定 位置插入或删除一条route map陈述,并且可以单独编辑,如果不 指定序号,则默认为10。
• 一个路由映射图的最后默认deny any。 • 如果是在策略路由中使用路由映射图,一个数据包不满足策略,它会按照目的地址 正常路由转发. • 在路由重分布中使用路由映射图,如果路由条目不满足策略,则被过滤。 • 在删除路由映射图陈述的时候,如果不指定陈述的编号,则删除整个路由映射图。
学习情境3 路由技术
深圳职业技术学院电子与通信工程学院
1
学习目标
2
3.5 路由重分布和路由优化
3
教学目标
1. 种子度量值和路由重分布 2. 路由映射表 3.分布列表 4.前缀列表 5. 策略路由 6. IP SLA
4
3.5.1 路由重分布
5
使用多种路由协议
• 不可能所有网络都运行一种路由协议 • 政治问题-部门之间没有很好的协作 • 多厂商设备的不匹配
描述 ACL表号或名称 分布列表作用的方向
interface-name
接口类型和编号
routing-process 路由进程号码
routing-process parameter
路由进程号码
32
distribute-list out Or in
R1(config-router)# distribute-list out Filter outgoing routing updates
isis
ISO IS-IS
iso-igrp IGRP for OSI networks
metric
Metric for redistributed routes
mobile
Mobile routes
odr
On Demand stub Routes
ospf
Open Shortest Path First (OSPF)
match metric route-map
…
<cr>
Redistribution of OSPF routes Metric for redistributed routes Route map reference
默认度量值为无限大
20
重分布进EIGRP 实例
• 带宽:Bandwidth in kilobytes = 10000 • 延迟:Delay in tens of microseconds = 100 • 可靠性:Reliability = 255 (maximum) • 负载:Load = 1 (minimum) • 最大传输单元:MTU = 1500 bytes
logical OR
logical AND
25
match 命令
Router(config-route-map)# match condition
match community match interface match ip address match ip next-hop match ip route-source match length match metric match route-type match tag
• 默认度量值20 • 默认度量类型为2 • 默认子网信息不重分布
18
重分布进OSPF实例
19
重分布进EIGRP
RtrA(config)# router eigrp 100 RtrA(config-router)# redistribute ospf ?
<1-65535> Process ID RtrA(config-router)# redistribute ospf 1 ?
192.168.5.0
R2 S0/0/0
R3
D 172.16.0.0/16 [90/...] D 10.0.0.0/8 [90/...]
R2(config)# access-list 7 permit 172.16.0.0 0.0.255.255 R2(config)# R2(config)# router eigrp 1 R2(config-router)# network 172.16.0.0 R2(config-router)# network 192.168.5.0 R2(config-router)# distribute-list 7 out Serial0/0/0 R2(config-router)#
Router(config-router)#
distribute-list {access-list-number | name} out [interface-name | routing-process [routing-process parameter]]
参数
access-listnumber | name out