HCIP——重发布及路由策略实验

重发布及路由策略实验

  • 一、实验拓扑
  • 二、实验要求
  • 三、实验思路
  • 三、实验步骤
    • 1、配置接口IP地址以及环回地址
    • 2、配置动态路由协议
    • 3、重发布
    • 4、更改接口类型
    • 5、配置路由策略

一、实验拓扑

HCIP——重发布及路由策略实验_第1张图片

二、实验要求

  • 1、使用双点双向重发布
  • 2、所有路由器进行最佳选路
  • 3、存在备份路径,不得出现环路,和路由回馈

三、实验思路

自建实验拓扑:
HCIP——重发布及路由策略实验_第2张图片

在进行多点双向重发布时,因为OSPF以及RIP协议之间不兼容,所以原路由的度量值进入新协议时,会被起始度量代替,从而导致选路不佳的问题
解决方案: 需要人为的干涉选路—路由策略技术

三、实验步骤

1、配置接口IP地址以及环回地址

R1:

[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ip address 14.1.1.1 24
[R1-GigabitEthernet0/0/0]int s4/0/0
[R1-Serial4/0/0]ip address 12.1.1.1 24
[R1]int l0
[R1-LoopBack0]ip address 1.1.1.1 24
[R1-LoopBack0]q
[R1]

R2:

[R2]int s4/0/0
[R2-Serial4/0/0]ip address 12.1.1.2 24
[R2-Serial4/0/0]int s4/0/1
[R2-Serial4/0/1]ip address 23.1.1.1 24
[R2-Serial4/0/1]q 
[R2]int l0
[R2-LoopBack0]ip address 2.2.2.2 24
[R2-LoopBack0]q
[R2]

R3:

[R3]int s4/0/0
[R3-Serial4/0/0]ip address 23.1.1.2 24
[R3-Serial4/0/0]int s4/0/1
[R3-Serial4/0/1]ip address 34.1.1.1 24
[R3-Serial4/0/1]q
[R3]

R4:

[R4]int g0/0/0
[R4-GigabitEthernet0/0/0]ip address 14.1.1.2 24
[R4-GigabitEthernet0/0/0]int s4/0/0
[R4-Serial4/0/0]ip address 34.1.1.2 24
[R4-Serial4/0/0]q
[R4]int l0
[R4-LoopBack0]ip address 4.4.4.4 24
[R4-LoopBack0]q
[R4]

2、配置动态路由协议

R1:

[R1]rip 1
[R1-rip-1]ver 2
[R1-rip-1]un su
[R1-rip-1]net 12.0.0.0
[R1-rip-1]net 14.0.0.0
[R1-rip-1]net 1.0.0.0

R2:

[R2]rip 1
[R2-rip-1]ver 2
[R2-rip-1]un su
[R2-rip-1]net 2.0.0.0
[R2-rip-1]net 12.0.0.0
[R2-rip-1]qu    
[R2]ospf 1 router-id 2.2.2.2
[R2-ospf-1]ar 0
[R2-ospf-1-area-0.0.0.0]net 23.1.1.1 0.0.0.0

R3:

[R3]ospf 1 router-id 3.3.3.3
[R3-ospf-1]ar 0
[R3-ospf-1-area-0.0.0.0]net 23.1.1.2 0.0.0.0
[R3-ospf-1-area-0.0.0.0]net 3.3.3.3 0.0.0.0
[R3-ospf-1-area-0.0.0.0]net 34.1.1.1 0.0.0.0

R4:

[R4]rip 1
[R4-rip-1]ver 2
[R4-rip-1]un su
[R4-rip-1]net 14.0.0.0
[R4]ospf 1 router-id 4.4.4.4
[R4-ospf-1]are 0
[R4-ospf-1-area-0.0.0.0]net 4.4.4.4 0.0.0.0
[R4-ospf-1-area-0.0.0.0]net 34.1.1.2 0.0.0.0

3、重发布

R2:

[R2]rip 1
[R2-rip-1]import-route ospf 1
[R2-rip-1]q
[R2]ospf 1
[R2-ospf-1]import-route rip
[R2-ospf-1]q
[R2]

R4:

[R4]rip 1
[R4-rip-1]import-route ospf 1
[R4-rip-1]q
[R4]ospf 1
[R4-ospf-1]import-route rip 
[R4-ospf-1]q
[R4]

4、更改接口类型

R3:

[R3]int lo 0

[R3-LoopBack0]ospf network-type broadcast

R4:

[R4]int lo 0
[R4-LoopBack0]ospf network-type broadcast

5、配置路由策略

R2:

[R2]ip ip-prefix 1 permit 34.1.1.0 24
[R2]ip ip-prefix 1 permit 4.4.4.0 24
[R2]route-policy 1 per node 10
[R2-route-policy]if-match ip-prefix 1
[R2-route-policy]apply cost 10
[R2-route-policy]q
[R2]route-policy 1 p node 20
[R2]rip 1
[R2-rip-1]im ospf 1 route-policy  1
[R2]ip ip-prefix 2 per 14.1.1.0 24
[R2]route-policy 2 per node 10
[R2-route-policy]if-match ip-prefix 2
[R2-route-policy]apply cost 10
[R2-route-policy]q
[R2]route-policy 2 permit node 20
[R2-route-policy]q
[R2]ospf 1
[R2-ospf-1]import-route rip 1 route-policy 2

R4:

[R4]ip ip-prefix 1 permit 23.1.1.0 24
[R4]route-policy 1 permit node 10
[R4-route-policy]if-match ip-prefix 1
[R4-route-policy]apply cost 10
[R4]route-policy 1 per no 20
[R4-route-policy]rip 1
[R4-rip-1]im ospf 1 rou 1
[R4]ip ip-prefix 2 per 2.2.2.0 24
[R4]ip ip-prefix 2 per 12.1.1.0 24
[R4]route-policy 2 per node 10
[R4-route-policy]if-match ip-prefix 2
[R4-route-policy]apply cost 10
[R4-route-policy]q
[R4]route-policy 2 per node 20
[R4-route-policy]q
[R4]ospf 1
[R4-ospf-1]import-route rip 1 route-policy 2

你可能感兴趣的:(网络,网络协议,HCIP,计算机网络,BGP,经验分享,华为)