ospf重发布

华子目录

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

一、实验拓扑

ospf重发布_第1张图片

二、实验要求

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

三、实验思路

1、配置接口IP地址以及环回地址(以此类推)

[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]

2、配置动态路由协议

[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]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]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]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]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]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]int lo 0
[R3-LoopBack0]ospf network-type broadcast

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

5、配置路由策略

[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]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

你可能感兴趣的:(网络)