CCNA-OSPF(开放式最短路径优先)协议之扩展配置
1、区域划分
红色区域为area 0,绿色区域为area 1,R2为边界路由。
2、配置
一、认证
直接在连接邻居的接口上配置
1、接口认证
(1)明文认证
R1(config)#interface serial 2/0 //进入连接邻居的接口
R1(config-if)#ip ospf authentication //开启明文认证服务
R1(config-if)#ip ospf authentication-key 123 //再配置认证的秘钥和模式、编号
(2)密文认证
R1(config)#interface serial 2/0
R1(config-if)#ip ospf authentication message-digest
R1(config-if)#ip ospf message-digest-key 1 md5 123
2、区域认证
全区域开启接口认证
R1(config)#router ospf 1
R1(config-router)#area 0 authentication //开启区域明文认证
R1(config-router)#area 0 authentication message-digest //开启区域密文认证
然后再根据接口认证中的配置密码等!
二、加快收敛
hello time 10s
dead time 40s
在直连邻居的接口上修改,且邻居间time 必须完全一致,否则无法保持邻居关系
r1(config)#interface s1/1
r1(config-if)#ip ospf hello-interval 5 修改本端的hello time,本端的dead time自动4倍关系匹配;
注意:
1)修改完hello时间之后,dead time自动4倍关系匹配
2)邻居间的hello时间必须一致
三、被动接口
仅接收不发送路由协议信息,用于连接用户的接口,不得用于连接邻居的接口
r2(config)#router ospf 1
r2(config-router)#passive-interface loopback 0
四、缺省路由
在边界路由器上配置缺省信息后,向内网发送缺省路由
R1(config)#router ospf 11
R1(config-router)#default-information originate //普通下发缺省(非强制下发)连接运营商的边界路由器需要有指向运营商的缺省,才可以下发成功。
R1(config)#router ospf 11
R1(config-router)#default-information originate always //强制下发缺省