一、拓扑图
每个路由器都存在环回,R1、R2的环回宣告到rip,R7的环回不做宣告,剩余路由器的环回宣告为ospf。
要求:
二、实施
1、底层—所有节点有用合法的IP地址
2、路由
动态路由协议配置
(1)【rip】
R1:
[r1]rip 1
[r1-rip-1]version 2
[r1-rip-1]network 1.0.0.0
[r1-rip-1]network 12.0.0.0
[r1-rip-1] network 13.0.0.0
R2:
[r2]rip 1
[r2-rip-1]version 2
[r2-rip-1]network 2.0.0.0
[r2-rip-1]network 12.0.0.0
R3:
[r3]rip 1
[r3-rip-1]version 2
[r3-rip-1]network 13.0.0.0
(2)【OSPF】
R2:
[r2]ospf 1 router-id 2.2.2.2
[r2-ospf-1]area 0
[r2-ospf-1-area-0.0.0.0]network 24.1.1.1 0.0.0.0
R3:
[r3]ospf 1 router-id 3.3.3.3
[r3-ospf-1]area 0
[r3-ospf-1-area-0.0.0.0] network 3.3.3.3 0.0.0.0
[r3-ospf-1-area-0.0.0.0] network 34.1.1.1 0.0.0.0
R4:
[r4]ospf 1 router-id 4.4.4.4
[r4-ospf-1]area 0
[r4-ospf-1-area-0.0.0.0] network 4.4.4.4 0.0.0.0
[r4-ospf-1-area-0.0.0.0] network 24.1.1.2 0.0.0.0
[r4-ospf-1-area-0.0.0.0] network 34.1.1.2 0.0.0.0
[r4-ospf-1-area-0.0.0.0] network 45.1.1.1 0.0.0.0
R5:
[r5]ospf 1 router-id 5.5.5.5
[r5-ospf-1]area 0
[r5-ospf-1-area-0.0.0.0]network 5.5.5.5 0.0.0.0
[r5-ospf-1-area-0.0.0.0] network 45.1.1.2 0.0.0.0
[r5-ospf-1-area-0.0.0.0] network 56.1.1.1 0.0.0.0
R6:
[r6]ospf 1 router-id 6.6.6.6
[r6-ospf-1]area 0
[r6-ospf-1-area-0.0.0.0] network 6.6.6.6 0.0.0.0
[r6-ospf-1-area-0.0.0.0] network 56.1.1.2 0.0.0.0
[r6-ospf-1-area-0.0.0.0] network 67.1.1.1 0.0.0.0
R7:
[r7]ospf 1 router-id 7.7.7.7
[r7-ospf-1]area 0
[r7-ospf-1-area-0.0.0.0]network 67.1.1.2 0.0.0.0
(3)重发布(R2、R3双向重发布;R7重发布直连):
R7:
[r7]ospf 1
[r7-ospf-1]import-route direct
R2:
[r2]rip 1
[r2-rip-1]import-route ospf 1
[r2-rip-1]q
[r2]ospf 1
[r2-ospf-1]import-route rip 1
R3:
[r3]rip 1
[r3-rip-1]import-route ospf 1
[r3-rip-1]q
[r3]ospf 1
[r3-ospf-1]import-route rip 1
3、策略
(1)解决环路
R2:
[r2]ip ip-prefix aa permit 7.7.7.7 24
[r2]route-policy aa permit node 10
Info: New Sequence of this List.
[r2-route-policy]if-match ip-prefix aa
[r2-route-policy]apply preference 151
[r2-route-policy]q
[r2]rip 1
[r2-rip-1]preference route-policy aa
R3:
[r3]ip ip-prefix aa permit 7.7.7.7 24
[r3]route-policy aa permit node 10
Info: New Sequence of this List.
[r3-route-policy]if-match ip-prefix aa
[r3-route-policy]apply preference 151
[r3-route-policy]q
[r3]rip 1
[r3-rip-1]preference route-policy aa
(1)选路佳:
路由回馈问题
[r3]int l0
[r3-LoopBack0]ospf network-type broadcast
负载均衡问题
[r1]ip ip-prefix a permit 34.1.1.0 24
[r1]int g 0/0/0
[r1-GigabitEthernet0/0/0]rip metricin ip-prefix a 2
[r2]ip ip-prefix b permit 3.3.3.0 24
[r2]int g 0/0/0
[r2-GigabitEthernet0/0/0]rip metricout ip-prefix b 2
[r3]ip ip-prefix c permit 24.1.1.0 24
[r3]int g 0/0/0
[r3-GigabitEthernet0/0/0]rip metricout ip-prefix c 2
4、测试