一、OSPF 的路由认证
![](https://i-blog.csdnimg.cn/blog_migrate/ae49cf668db478660c4a8342478cf20d.png)
(1)链路认证
明文认证:
(config-if)#ip ospf authentication
(config-if)#ip ospf
authentication-key 密码
密文认证:
(config-if)#ip ospf authentication
message-digest
(config-if)#ip ospf
message-digest-key 数字ID序列号 md5 密码
注意:这里
链路两端配置的数字ID序列号必须相同
,不同时链路无法连通
(2)区域认证
在同区域的每台路由器及每台路由器接入该区域的接口下进行配置:
第一步:在
路由进程下配置
(config)#router ospf 100
(config-router)#
area 区域号 authentication message-digest
第二步:在接入该区域的
接口下配置
(config)#int f0/0
(config-if)#
ip ospf message-digest-key 数字ID序列号 md5 密码
注意:同一路由器接入不同区域的不同接口的秘钥可以不同
二、OSPF 的默认路由
方法一:
ip route 0.0.0.0 0.0.0.0 出口/IP地址
Router ospf 100
Default-information originate
假设R1连接Internet,.配置环回口LOOPBACK