双向重发布及路由策略实验

实验要求
(1)两个协议间进行多点双向重发布。
(2)R7环回没有宣告在OSPF中,而是后期发布进行的。
(3)解决环路,所有路径选择最优,且存在备份。

实验拓扑图
双向重发布及路由策略实验_第1张图片
配置IP地址及路由协议

R1:

[r1]interface GigabitEthernet 0/0/0
[r1-GigabitEthernet0/0/0] ip add 12.1.1.1 24
[r1-GigabitEthernet0/0/0]int g0/0/1
r1-GigabitEthernet0/0/1]ip add 13.1.1.1 24
[r1-GigabitEthernet0/0/1]int lo0
[r1-LoopBack0]ip add 1.1.1.1 24
[r1-LoopBack0]rip 1
[r1-rip-1]ver 2
[r1-rip-1]undo summary 
[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]int g0/0/0
[r2-GigabitEthernet0/0/0] ip add 24.1.1.1 24
[r2-GigabitEthernet0/0/1]
[r2-GigabitEthernet0/0/1]ip ad 12.1.1.2 24
[r2-GigabitEthernet0/0/1]int lo0
[r2-LoopBack0]ip address  2.2.2.2 24

R3:

[r3]int g0/0/0
[r3-GigabitEthernet0/0/0]
[r3-GigabitEthernet0/0/0]ip add 34.1.1.1 24
[r3-GigabitEthernet0/0/0]int g0/0/1
[r3-GigabitEthernet0/0/1]ip add 13.1.1.2 24
[r3-GigabitEthernet0/0/1]int lo0
[r3-LoopBack0]ip add 3.3.3.3 24

R4:

[r4]int g0/0/1
[r4-GigabitEthernet0/0/1]ip add 24.1.1.2 24
[r4-GigabitEthernet0/0/1]int g0/0/2
[r4-GigabitEthernet0/0/2] ip add 34.1.1.2 24
[r4-GigabitEthernet0/0/2]int lo0
[r4-LoopBack0]ip add 4.4.4.4  24
[r4-LoopBack0] int g0/0/0
[r4-GigabitEthernet0/0/0]ip add 45.1.1.1 24
[r4-GigabitEthernet0/0/0]q
[r4]ospf r	
[r4]ospf router-id 4.4.4.4
[r4-ospf-1]area 0
[r4-ospf-1-area-0.0.0.0] net	
[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]int g0/0/1
[r5-GigabitEthernet0/0/1] ip add 45.1.1.2 24
[r5-GigabitEthernet0/0/1]int lo0
[r5-LoopBack0]ip add 5.5.5.5 24
[r5-LoopBack0]int g0/0/0
[r5-GigabitEthernet0/0/0]ip ad	
[r5-GigabitEthernet0/0/0]ip address  56.1.1.1 24
[r5]ospf 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.0 0.0.0.0
[r5-ospf-1-area-0.0.0.0]network 56.1.1.1 0.0.0.0

R6:

[r6]int g0/0/0
[r6-GigabitEthernet0/0/0]ip ad 	
[r6-GigabitEthernet0/0/0]ip address 67.1.1.1 24
[r6-GigabitEthernet0/0/0]int g0/0/1
[r6-GigabitEthernet0/0/1]ip add 56.1.1.2 24
[r6-GigabitEthernet0/0/1]int lo0
[r6-LoopBack0]ip add 6.6.6.6 24
[r6]ospf 1 router-id  6.6.6.6 
[r6-ospf-1]area 0
[r6-ospf-1-area-0.0.0.0]net	
[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]int g0/0/1
[r7-GigabitEthernet0/0/1]ip add 67.1.1.2 24
[r7-GigabitEthernet0/0/1]int lo0
[r7-LoopBack0]ip add 7.7.7.7 24
[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
[r7-ospf-1-area-0.0.0.0]q
[r7-ospf-1]import-route  direct 

配置重发步及路由策略
对于R2而言:

[r2]rip 1
[r2-rip-1] ver 2
[r2-rip-1]undo  summary 
[r2-rip-1]network  2.0.0.0
[r2-rip-1]network  12.0.0.0
[r2-rip-1]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
[r2-ospf-1-area-0.0.0.0]q
[r2-ospf-1]rip 1
[r2-rip-1]import-route  ospf  1
[r2-rip-1]ospf 1
[r2-ospf-1]import-route  rip 
[r2-ospf-1]ip ip-prefix aa permit 7.7.7.0 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
[r2-rip-1]preference route-policy  aa	
[r2]ip ip-prefix bb permit  3.3.3.3 32
[r2]ip ip-prefix bb permit  34.1.1.0 24
[r2]int g0/0/1
[r2-GigabitEthernet0/0/1]rip metricout ip-prefix  bb 2
[r2-GigabitEthernet0/0/1]q
[r2]ip ip-prefix cc permit  12.1.1.0 24
[r2]ip ip-prefix cc permit  2.2.2.0 24
[r2]route-policy  cc permit  node  10
Info: New Sequence of this List.
[r2-route-policy]if-match  ip-prefix cc
[r2-route-policy]apply  cost-type type-1
[r2]route-policy cc permit  n	
[r2]route-policy cc permit  node  20
Info: New Sequence of this List.
[r2-route-policy]q
[r2]ospf 1
[r2-ospf-1]import-route  rip route-policy  cc

对于R3而言:

R3
[r3]rip 1
[r3-rip-1]ver 2	
[r3-rip-1]undo silent-interface
[r3-rip-1]undo summary
[r3-rip-1]network  13.0.0.0
[r3-rip-1]ospf 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
[r3-ospf-1-area-0.0.0.0]q
[r3-ospf-1]q
[r3]ospf 1
[r3-ospf-1]import-route rip
[r3-ospf-1]q
[r3]rip 1
[r3-rip-1]import-route  ospf  1
[r3-rip-1]q
[r3]ip ip-prefix aa permit  7.7.7.0 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]rip
[r3-rip-1]preference  100 route-policy  aa
[r3-rip-1]q
[r3]int g0/0/1
[r3-GigabitEthernet0/0/1]rip metricout ip-prefix  bb 2
[r3-GigabitEthernet0/0/1]ip ip-prefix cc pe	
[r3-GigabitEthernet0/0/1]ip ip-prefix cc permit 13.1.1.0 24
[r3]route-policy cc permit  node  10
Info: New Sequence of this List.
[r3-route-policy]if-match  ip-prefix cc
[r3-route-policy]apply  cost-type type-1
[r3]route-policy cc permit node 20
Info: New Sequence of this List.
[r3]ospf 1
[r3-ospf-1]import-route  rip route-policy  cc

到此,实验配置命令已完成!!!

你可能感兴趣的:(http,网络,安全)