路由引入:将路由信息从一种协议引入到另一种协议。
拓扑如下:
第一步:按照拓扑图所示,R1,R2,R4配置OSPF。
#
sysname r1
#
interface GigabitEthernet0/0/0
ip address 192.168.1.1 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 10.1.12.1 255.255.255.0
#
interface GigabitEthernet0/0/2
ip address 10.1.14.1 255.255.255.0
#
interface NULL0
#
ospf 1
filter-policy ip-prefix net192 export
import-route direct
area 0.0.0.0
network 10.1.12.1 0.0.0.0
network 10.1.14.1 0.0.0.0
#
#
sysname r2
#
interface GigabitEthernet0/0/0
ip address 10.1.12.2 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 10.1.23.2 255.255.255.0
#
ospf 1
area 0.0.0.0
network 10.1.12.2 0.0.0.0
#
#
sysname r4
#
interface GigabitEthernet0/0/0
ip address 10.1.14