1.配置ip
R1:
int g0/0/0
ip add 12.1.1.1 24
int g0/0/1
ip add 13.1.1.1 24
int lo0
ip add 1.1.1.1 24
R2:
sys
sys r2
int g0/0/0
ip add 12.1.1.2 24
int g0/0/1
ip add 24.1.1.1 24
int lo0
ip add 2.2.2.2 24
R3:
sys
sys r3
int g0/0/0
ip add 34.1.1.1 24
int g0/0/1
ip add 13.1.1.2 24
int lo0
ip add 3.3.3.3 24
R4:
sys
sys r4
int g0/0/0
ip add 34.1.1.2 24
int g0/0/1
ip add 24.1.1.2 24
int g0/0/2
ip add 45.1.1.1 24
int lo0
ip add 4.4.4.4 24
R5:
sys
sys r5
int g0/0/0
ip add 45.1.1.2 24
int g0/0/1
ip add 56.1.1.1 24
int lo0
ip add 5.5.5.5 24
R6:
sys
sys r6
int g0/0/0
ip add 56.1.1.2 24
int g0/0/1
ip add 67.1.1.1 24
int lo0
ip add 6.6.6.6 24
R7:
sys
sys r7
int g0/0/0
ip add 67.1.1.2 24
int lo0
ip add 7.7.7.7 24
配置RIP OSPF
R1:
#
rip 1
version 2
network 1.0.0.0
network 12.0.0.0
network 13.0.0.0
R2:
#
ospf 1
area 0.0.0.0
network 24.1.1.0 0.0.0.255
#
rip 1
version 2
network 2.0.0.0
network 12.0.0.0
R3:
#
ospf 1
area 0.0.0.0
network 3.3.3.3 0.0.0.0
network 34.1.1.0 0.0.0.255
#
rip 1
version 2
network 13.0.0.0
R4:
#
ospf 1
area 0.0.0.0
network 4.4.4.4 0.0.0.0
network 24.1.1.0 0.0.0.255
network 34.1.1.0 0.0.0.255
network 45.1.1.0 0.0.0.255
R5:
#
ospf 1
area 0.0.0.0
network 5.5.5.5 0.0.0.0
network 45.1.1.0 0.0.0.255
network 56.1.1.0 0.0.0.255
R6:
#
ospf 1
area 0.0.0.0
network 6.6.6.6 0.0.0.0
network 56.1.1.0 0.0.0.255
network 67.1.1.0 0.0.0.255
R7:
#
ospf 1
area 0.0.0.0
network 67.1.1.0 0.0.0.255
将R7上环回重发布进入OSPF
将R7的环路以直连接口的形式重发布:
ospf 1
import-route direct
在R2、R3上进行双点双向重发布:
ospf 1
import-route rip 1
q
rip 1
import-route ospf 1
[r3]int lo0
[r3-LoopBack0]ospf network-type broadcast
解决环路问题:
出现现象:
解决方案:
R2:
ip ip-prefix a index 10 permit 7.7.7.0 24
route-policy a permit node 10
if-match ip-prefix a
apply preference 151
rip 1
preference route-policy a
R3:
ip ip-prefix a index 10 permit 7.7.7.0 24
route-policy a permit node 10
if-match ip-prefix a
apply preference 151
rip 1
preference route-policy a
标签:策略,g0,0.0,add,实验,ip,24int,路由,network From: https://www.cnblogs.com/miracle01/p/17040838.html