思科设备参考:路由引入实验(思科)
技术简介
路由引入技术在网络通信中起着重要的作用,能够实现不同路由协议之间的路由传递,并在路由引入时部署路由控制,实现路径或策略的控制
实验目的
不同的路由协议之间互相学习到对方的路由信息,并连通(Import注入)
基础配置
Router1
[Huawei]undo info-center enable [Huawei]int LoopBack 1 [Huawei-LoopBack1]ip address 1.1.1.1 32 [Huawei-LoopBack1]quit [Huawei]int e0/0/0 [Huawei-Ethernet0/0/0]ip address 192.168.10.1 24 [Huawei-Ethernet0/0/0]undo shutdown [Huawei-Ethernet0/0/0]quit [Huawei]ospf 4 router-id 1.1.1.1 [Huawei-ospf-4]area 0 [Huawei-ospf-4-area-0.0.0.0]network 1.1.1.1 0.0.0.0 [Huawei-ospf-4-area-0.0.0.0]network 192.168.10.0 0.0.0.255
Router2
[Huawei]undo info-center enable [Huawei]int LoopBack 1 [Huawei-LoopBack1]ip address 2.2.2.2 32 [Huawei-LoopBack1]quit [Huawei]int e0/0/0 [Huawei-Ethernet0/0/0]ip address 192.168.10.2 24 [Huawei-Ethernet0/0/0]undo shutdown [Huawei-Ethernet0/0/0]quit [Huawei]int e0/0/1 [Huawei-Ethernet0/0/1]ip address 192.168.20.1 24 [Huawei-Ethernet0/0/1]undo shutdown [Huawei-Ethernet0/0/1]quit [Huawei]ospf 4 router-id 2.2.2.2 [Huawei-ospf-4]area 0 [Huawei-ospf-4-area-0.0.0.0]network 2.2.2.2 0.0.0.0 [Huawei-ospf-4-area-0.0.0.0]network 192.168.10.0 0.0.0.255 [Huawei]rip 4 [Huawei-rip-4]version 2 [Huawei-rip-4]network 2.0.0.0 [Huawei-rip-4]network 192.168.20.0
Router3
[Huawei]undo info-center enable [Huawei]int LoopBack 1 [Huawei-LoopBack1]ip address 3.3.3.3 32 [Huawei-LoopBack1]quit [Huawei]int e0/0/0 [Huawei-Ethernet0/0/0]ip address 192.168.20.2 24 [Huawei-Ethernet0/0/0]undo shutdown [Huawei-Ethernet0/0/0]quit [Huawei]int e0/0/1 [Huawei-Ethernet0/0/1]ip address 192.168.30.1 24 [Huawei-Ethernet0/0/1]undo shutdown [Huawei-Ethernet0/0/1]quit [Huawei]rip 4 [Huawei-rip-4]version 2 [Huawei-rip-4]network 3.0.0.0 [Huawei-rip-4]network 192.168.20.0
测试
此时,基础配置已经完成,两个协议内部都可以学习到本协议的路由信息,并连通。但协议与协议之间的路由学习还需要配置路由引入
配置引入
Router2(边界路由器)
[Huawei]ospf 4 router-id 2.2.2.2 [Huawei-ospf-4]import-route rip 4 [Huawei-ospf-4]quit [Huawei]rip 4 [Huawei-rip-4]import-route ospf 4
测试
路由引入可能会出现的问题
问题:次优路径问题和环路问题
解决方法:修改AD值或设置路由过滤