美文网首页
OSPF -- 路由引入

OSPF -- 路由引入

作者: liaozb1996 | 来源:发表于2018-03-28 13:45 被阅读0次
OSPF.PNG

描述

下方是公司A,使用OSPF;上方是公司B,不使用OSPF;

问题1:
为了PC能访问公司B,可以在R1上配置静路由,并在OSPF上配置路由引入。这样公司A的所有路由器都会得到到达公司B的路由信息

问题2:
公司A的Area3未与骨干区域Area0相连,需在R3和R5上配置虚链接

OSPF 路由引入

R1:

[R1]ip route-static 172.16.100.0 24 100.1.1.7  # 配置到公司B的静态路由

[R1]ospf    
[R1-ospf-1]import-route static  # 在ospf中引入静态路由
# type
## type 1: cost = 内部cost + 外部cost(默认为1)
## type 2: cost = 外部cost
# cost : 修改外部 cost 

默认路由

R7:

[R7]ip route-static 0.0.0.0 0.0.0.0 100.1.1.1

两台相连的路由器之间不能都配置默认路由,否则ping一个不存在的地址时会出现环路

虚链路

router id

配置 router id

方式一:

[R3]router id 3.3.3.3

方式二:

[R3]ospf 1 router-id 3.3.3.3

若未配置 router id 就先配置 ospf ,路由器会按一下方式选举 router id

  1. loopback 接口中IP最大的
  2. 物理接口中IP最大的

再次配置 router id 要重启 ospf 进程 :

<R3>reset ospf process 

虚链路

格式: 在经过的区域下:vlink-peer <对方Router ID>

[R1-ospf-1-area-0.0.0.2]vlink-peer 5.5.5.5 

相关文章

网友评论

      本文标题:OSPF -- 路由引入

      本文链接:https://www.haomeiwen.com/subject/rhiefftx.html