首先给路由配置ip
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 12.1.1.1/24 up up
GigabitEthernet0/0/1 13.1.1.1/24 up up
GigabitEthernet0/0/2 unassigned down down
LoopBack0 1.1.1.1/24 up up(s)
其次做通RIP OSPF
rip 1
version 2
network 12.0.0.0
network 1.0.0.0
network 13.0.0.0
ospf 1 router-id 4.4.4.4
area 0.0.0.0
network 0.0.0.0 255.255.255.255
重发布
[Huawei-ospf-1]import-route direct
[Huawei-rip-1]import-route ospf 1
[Huawei-ospf-1]import-route rip
此时在R34里面R7的环回下一跳有问题
解决方法为
ip ip-prefix b index 10 permit 7.7.7.0 24
rip metricout ip-prefix b 2
为了防止后面选路不佳两个asbr都要做
调整最佳选路
R4去12网段下一跳应该为R2路由器(ip地址为:24.1.1.1)
ip ip-prefix c index 10 permit 12.1.1.0 24
if-match ip-prefix c
apply cost-type type-1
其他选路与此同理