双点双向重发布&路由策略实验

双点双向重发布&路由策略实验

双点双向重发布&路由策略实验_第1张图片

rip配置

[R1]rip 100
[R1-rip-100]version 2
[R1-rip-100]network 12.0.0.0
[R1-rip-100]network 14.0.0.0
[R1-rip-100]network 1.0.0.0

[R2]rip 100
[R2-rip-100]version 2
[R2-rip-100]network 12.0.0.0
[R2-rip-100]network 2.0.0.0

[R4]rip 100
[R4-rip-100]version 2
[R4-rip-100]network 14.0.0.0

ospf配置

[R2]ospf 100
[R2-ospf-100]area 0
[R2-ospf-100-area-0.0.0.0]int g0/0/0
[R2-GigabitEthernet0/0/0]ospf enable 100 area 0

[R3]ospf 100
[R3-ospf-100]area 0
[R3-ospf-100-area-0.0.0.0]int loo0
[R3-LoopBack0]ospf network-type broadcast 
[R3-LoopBack0]ospf enable 100 area 0
[R3-LoopBack0]int g0/0/0
[R3-GigabitEthernet0/0/0]ospf enable 100 area 0
[R3-GigabitEthernet0/0/0]int g0/0/1
[R3-GigabitEthernet0/0/1]ospf enable 100 area 0	

[R4]ospf 100
[R4-ospf-100]area 0
[R4-ospf-100-area-0.0.0.0]int loo0
[R4-LoopBack0]ospf network-type broadcast 
[R4-LoopBack0]ospf enable 100 area 0
[R4-LoopBack0]int g0/0/1
[R4-GigabitEthernet0/0/1]ospf enable 100 area 0

双点双向重发布

[R2]ospf 100
[R2-ospf-100]import-route rip 100
[R2]rip 100
[R2-rip-100]import-route ospf 100

[R4]rip 100
[R4-rip-100]import-route ospf 100
[R4]ospf 100
[R4-ospf-100]import-route rip 100

R1、R3路由表

双点双向重发布&路由策略实验_第2张图片

双点双向重发布&路由策略实验_第3张图片

路由优化
R1路由表优化
23.1.1.0/24走R2——增大R4重发布过来路由的cost值

[R4]acl 2000
[R4-acl-basic-2000]rule permit source 23.1.1.0 0.0.0.0

[R4]route-policy a1 permit node 10
Info: New Sequence of this List.
[R4-route-policy]if-match acl 2000
[R4-route-policy]apply cost 3
[R4-route-policy]q
[R4]route-policy a1 permit node 20
Info: New Sequence of this List.

[R4]rip 100
[R4-rip-100]import-route ospf 100 route-policy a1

​ 4.4.4.0/24、34.1.1.0/24走R4——增大R2过来路由的cost值

[R2]acl 2000
[R2-acl-basic-2000]rule permit source 34.1.1.0 0.0.0.0
[R2-acl-basic-2000]rule permit source 4.4.4.0 0.0.0.0

[R2]route-policy a1 permit node 10
Info: New Sequence of this List.
[R2-route-policy]if-match acl 2000
[R2-route-policy]apply cost 3
[R2-route-policy]q
[R2]route-policy a1 permit node 20
Info: New Sequence of this List.

[R2]rip 100
[R2-rip-100]import-route ospf 100 route-policy a1

R1优化后路由表

双点双向重发布&路由策略实验_第4张图片

R3路由表优化
2.2.2.0/24、12.1.1.0/24走R2——R2重发布过来路由类型改为类型1

[R2]ip ip-prefix b1 permit 2.2.2.0 24
[R2]ip ip-prefix b1 permit 12.1.1.0 24

[R2]route-policy a2 permit node 10
Info: New Sequence of this List.
[R2-route-policy]if-match ip-prefix b1
[R2-route-policy]apply cost-type type-1
[R2-route-policy]q
[R2]route-policy a2 permit node 20
Info: New Sequence of this List.

[R2]ospf 100
[R2-ospf-100]import-route rip 100 route-policy a2

​ 14.1.1.0/24走R4——R4重发布过来路由类型改为类型1

	[R4]ip ip-prefix b1 permit 14.1.1.0 24

	[R4]route-policy a2 permit node 10
	Info: New Sequence of this List.
	[R4-route-policy]if-match ip-prefix b1
	[R4-route-policy]apply cost-type type-1
	[R4-route-policy]q
	[R4]route-policy a2 permit node 20
	Info: New Sequence of this List.
	
	[R4]ospf 100
	[R4-ospf-100]import-route rip 100 route-policy a2



```bash

R3优化后路由表

双点双向重发布&路由策略实验_第5张图片

你可能感兴趣的:(华为路由器,ospf,RIP路由,OSPF路由)