配置OSPF身份验证和MD5验证
- 格式:doc
- 大小:29.00 KB
- 文档页数:2
怎么验证md5MD5(Message Digest Algorithm 5)是一种常用的哈希算法,用于对数据进行加密和验证。
MD5算法将任意长度的数据映射为固定长度的128位哈希值。
在网络通信中,MD5常用于验证数据的完整性,以确保数据传输过程中没有被篡改。
本文将介绍如何使用MD5进行数据验证,并介绍一些常见的验证方法。
一、什么是MD5MD5是一种非常常用的哈希算法,它能够将任意长度的数据生成一个唯一的128位哈希值。
MD5算法是单向的,即无法通过哈希值推导出原始数据。
另外,MD5算法具有以下特点:1. 相同的输入一定会得到相同的输出;2. 不同的输入会得到不同的输出;3. 即使输入非常接近,只有一个比特的差异,输出也会有很大的不同;4. MD5算法的输出长度固定为128位。
MD5算法广泛应用于各种领域,包括网络通信、数据存储、密码学等。
在网络通信中,经常使用MD5算法对数据进行验证,以确保数据的完整性和安全性。
二、如何验证MD5MD5是一种哈希算法,它可以将任意长度的数据生成固定长度的哈希值。
为了验证数据的完整性,常常需要将原始数据通过MD5算法生成哈希值,并将哈希值与传输过程中接收到的哈希值进行比较。
如果两者一致,则说明数据没有被篡改,否则说明数据可能已经被篡改。
以下是一种常见的验证MD5的方法:1. 生成哈希值首先,将原始数据通过MD5算法生成哈希值。
可以使用各种编程语言提供的MD5库或者在线的MD5加密工具来生成哈希值。
具体的生成方法可以参考相关的文档或者API文档。
2. 比较哈希值在传输过程中,接收方会接收到原始数据以及生成的哈希值。
接收方需要将接收到的原始数据再次通过MD5算法生成哈希值,并将生成的哈希值与接收到的哈希值进行比较。
如果两者一致,则说明数据没有被篡改;如果两者不一致,则说明数据可能已经被篡改。
3. 注意安全性MD5算法是一种相对较弱的哈希算法,已经被证明存在一定的安全问题,包括碰撞攻击等。
md5文件验证方法MD5文件验证方法非常简单,它主要分为以下几个步骤:1.生成MD5值:首先,我们需要计算文件的MD5值。
可以使用MD5算法将整个文件转换为128位的哈希值,这个值被称为文件的MD5哈希值。
5.对比MD5值:将计算得到的MD5哈希值与文件的原始MD5值进行对比。
如果两个值相同,则文件未被篡改且传输无误;如果两个值不同,则文件可能已被篡改或传输过程中产生错误。
MD5文件验证方法的优点是快速和简单,只需要两个MD5哈希值进行对比即可。
然而,MD5算法存在一些问题,因此在实际使用过程中需要注意以下几点:1.容易被篡改:MD5算法本身并不是加密算法,它只是一种哈希算法。
因此,MD5哈希值容易被篡改和冲突。
黑客可以通过改变文件内容或替换MD5哈希值来欺骗系统。
2.潜在冲突:MD5算法存在潜在的碰撞风险,即两个不同的文件可能生成相同的MD5哈希值。
虽然这种情况较为罕见,但在一些特殊情况下可能会发生。
为了解决这些问题,我们可以采取以下改进措施:1.使用更安全的哈希算法:由于MD5算法的安全性问题,推荐使用更安全的哈希算法,如SHA-256或SHA-512、这些算法的哈希值更长,冲突风险较低。
2.对比多个哈希值:为了提高验证的准确性,可以计算多个哈希值,并对比它们。
例如,除了MD5哈希值之外,还可以计算SHA-256或SHA-512哈希值,并进行对比。
3.使用文件完整性验证工具:有一些专门的软件和工具可以帮助我们验证文件的完整性。
这些工具通常支持多种哈希算法,并提供更多的验证选项和功能,如递归验证文件夹、自动计算哈希值等。
总结来说,MD5文件验证方法是一种简单而快速的验证手段,可以帮助我们验证文件的完整性和准确性。
然而,由于MD5算法的一些局限性,我们应该采取一些改进措施,如使用更安全的哈希算法、对比多个哈希值以提高准确性,并使用专业的文件完整性验证工具。
实验名称:OSPF 认证实验设备:路由器3700二台(模拟器GNS3)实验拓补:基本配置:Router>enableRouter#configure terminalRouter(config)#hostname R1R1(config)#interface serial 1/0R1(config-if)#ip address 192.168.100.1 255.255.255.252R1(config-if)#no shutdownR1(config)#interface loopback 10R1(config-if)#ip address 192.168.1.1 255.255.255.0R1(config)#router ospf 10R1(config-router)#network 192.168.1.0 0.0.0.255 area 0R1(config-router)#network 192.168.100.0 0.0.0.3 area 0 Router>enableRouter#configure terminalRouter(config)#hostname R2R2(config)#interface loopback 10R2(config-if)#ip address 192.168.2.1 255.255.255.0R2(config)#interface serial 1/0R2(config-if)#ip address 192.168.100.2 255.255.255.252R2(config-if)#clock rate 64000R2(config-if)#no shutdownR2(config)#router ospf 20R2(config-router)#network 192.168.2.0 0.0.0.255 area 0R2(config-router)#network 192.168.100.0 0.0.0.3 area 0认证方式:一、明文认证R1 配置R1(config)#interface serial 1/0R1(config-if)#ip ospf authentication /**在所有参与OSPF进程的接口启用明文验证R1(config-if)#ip ospf authentication-key cisco /**设置明文口令R1(config)#interface loopback 10R1(config-if)#ip ospf authenticationR1(config-if)#ip ospf authentication-key ciscoR1(config)#router ospf 10R1(config-router)#area 0 authentication /**声明在Area 0 使用明文验证R2配置R2(config)#interface serial 1/0R2(config-if)#ip ospf authenticationR2(config-if)#ip ospf authentication-key ciscoR2(config)#interface loopback 10R2(config-if)#ip ospf authenticationR2(config-if)#ip ospf authentication-key ciscoR2(config)#router ospf 20R2(config-router)#area 0 authentication二、MD5认证R1 配置R1(config)#interface serial 1/0R1(config-if)#no ip ospf authentication-key /**取消以前的明文密码R1(config-if)#ip ospf authentication message-digest /**启用MD5的密文验证R1(config-if)#ip ospf message-digest-key 1 md5 cisco /**设置密文验证的口令R1(config)#interface loopback 10R1(config-if)#no ip ospf authentication-keyR1(config-if)#ip ospf authentication message-digestR1(config-if)#ip ospf message-digest-key 1 md5 ciscoR1(config)#router ospf 10R1(config-router)#area 0 authentication message-digest /**声明Area 0 使用密文验证R2 配置R2(config)#interface serial 1/0R2(config-if)#no ip ospf authentication-keyR2(config-if)#ip ospf authentication message-digestR2(config-if)#ip ospf message-digest-key 1 md5 ciscoR2(config)#interface loopback 10R2(config-if)#no ip ospf authentication-keyR2(config-if)#ip ospf authentication message-digestR2(config-if)#ip ospf message-digest-key 1 md5 ciscoR2(config)#router ospf 20R2(config-router)#area 0 authentication message-digestR2#show ip ospf interface serial 1/0 /** 查看配置的验证。
实验目的:掌握OSPF协议的所有验证的类型和验证强度。
实验步骤:一、按照拓扑,将所有路由器的接口基本配置及ospf完成,使得整个OSPF全互联。
二、在R3和R4 之间进行链路验证。
(1)链路的明文验证首先在R3上查看邻居表,与R4的关系处于FULL状态R3#sh ip os neiNeighbor ID Pri State Dead Time Address Interface2.2.2.2 0 FULL/ - 00:00:38 192.168.23.2 Serial0/14.4.4.4 0 FULL/ - 00:00:35 192.168.34.4 Serial0/0R3(config)#int s0/0R3(config-if)#ip ospf authentication-key jhy //密钥R3(config-if)#ip ospf authentication //声明实验现象:R3(config-if)#*Mar 1 00:14:07.471: %OSPF-5-ADJCHG: Process 1, Nbr 4.4.4.4 on Serial0/0 from FULL to DOWN,Neighbor Down: Dead timer expired //邻居关系DOWN了R3#sh ip os nei//查看邻居表Neighbor ID Pri State Dead Time Address Interface2.2.2.2 0 FULL/ - 00:00:34 192.168.23.2 Serial0/1R4(config)#int s0/0 //在R4的接口做相同的配置R4(config-if)#ip os authentication-key jhyR4(config-if)#ip os authentication实验现象:邻居关系重新建立R4#sh ip os neiNeighbor ID Pri State Dead Time Address Interface3.3.3.3 0 FULL/ - 00:00:34 192.168.34.3 Serial0/0(2)链路的密文验证R3(config-if)#ip os message-digest-key 1 md5 jhy//密钥R3(config-if)#ip os authentication message-digest //声明R4(config-if)#ip os message-digest-key 1 md5 jhyR4(config-if)#ip os authentication message-digest三、Area 0 的区域验证。
H3C防火墙配置说明杭州华三通信技术有限公司版权所有侵权必究All rights reserved相关配置方法:配置OSPF验证从安全性角度来考虑,为了避免路由信息外泄或者对OSPF路由器进行恶意攻击,OSPF提供报文验证功能。
OSPF路由器建立邻居关系时,在发送的报文中会携带配置好的口令,接收报文时进行密码验证,只有通过验证的报文才能接收,否则将不会接收报文,不能正常建立邻居。
要配置OSPF报文验证,同一个区域的所有路由器上都需要配置区域验证模式,且配置的验证模式必须相同,同一个网段内的路由器需要配置相同的接口验证模式和口令。
表1-29 配置OSPF验证提高IS-IS网络的安全性在安全性要求较高的网络中,可以通过配置IS-IS验证来提高IS-IS网络的安全性。
IS-IS验证特性分为邻居关系的验证和区域或路由域的验证。
配置准备在配置IS-IS验证功能之前,需完成以下任务:∙配置接口的网络层地址,使相邻节点网络层可达∙使能IS-IS功能配置邻居关系验证配置邻居关系验证后,验证密码将会按照设定的方式封装到Hello报文中,并对接收到的Hello报文进行验证密码的检查,通过检查才会形成邻居关系,否则将不会形成邻居关系,用以确认邻居的正确性和有效性,防止与无法信任的路由器形成邻居。
两台路由器要形成邻居关系必须配置相同的验证方式和验证密码。
表1-37 配置邻居关系验证必须先使用isis enable命令使能该接口才能进行参数level-1和level-2的配置。
如果没有指定level-1或level-2参数,将同时为level-1和level-2的Hello报文配置验证方式及验证密码。
如果没有指定ip或osi参数,将检查Hello报文中OSI的相应字段的配置内容。
配置区域验证通过配置区域验证,可以防止将从不可信任的路由器学习到的路由信息加入到本地Level-1的LSDB中。
配置区域验证后,验证密码将会按照设定的方式封装到Level-1报文(LSP、CSNP、PSNP)中,并对收到的Level-1报文进行验证密码的检查。
路由器OSPF协议配置命令strong>OSPF 协议配置命令4.7.1 default redistribute cost配置引入外部路由时缺省的花费值, no default redistribute cost 命令取消配置。
default redistribute cost costno default redistribute cost【参数说明】cost 为花费值,范围 1~65535 之间的整数。
【命令模式】OSPF协议配置模式【使用指南】在OSPF将路由器上其它路由协议发现的路由引入作为自己的自治系统外部路由信息时,还需要一些额外的参数,包括:路由的缺省花费和缺省的标记等。
【举例】配置OSPF引入外部路由时缺省的花费值为 10。
Quidway(config-router-ospf)#default redistribute cost 10【相关命令】default redistribute tagdefault redistribute type4.7.2 default redistribute interval配置OSPF引入外部路由的时间间隔,no default redistribute interval 命令恢复缺省值。
default redistribute interval timeno default redistribute interval【参数说明】time 为引入外部路由的时间间隔,以秒为单位,范围 1~65535 之间的整数。
【缺省情况】OSPF引入外部路由的时间间隔缺省为 1秒。
【命令模式】OSPF协议配置模式【使用指南】由于OSPF总是要不停的引入外部的路由信息并将它们传播到整个自治系统中去,因此,有必要规定协议引入外部路由的时间间隔。
【举例】指定OSPF引入外部路由的时间间隔为 2秒。
Quidway(config-router-ospf)#default redistribute interval 2【相关命令】default istribute limit4.7.3 default redistribute limit配置OSPF可引入路由数量的上限, no default redistribute limit 命令恢复缺省值。
华为交换机ospf怎么配置篇一:华为5700交换机OSPF配置华为5700交换机OSPF配置1 实验目标通过实验模拟3台5700交换机上运行OSPF动态路由协议。
完成对华为5700交换机的OSPF基本及多区域配置,修改接口COST值、网络类型,启用接口OSPF简单验证,外部静态路由重分布进OSPF 以及使用相关的命令来查看验证配置。
2 实验拓扑图3 拓扑图描述3台华为5700交换机运行OSPF动态路由协议,接口对应的IP 地址分配已经在图上标出,并将各个环回口的地址作为每台交换机的router-id(环回口均不启用ospf),在sw1上引入一条静态路由使sw1成为asbr,在sw1与sw2连接的接口上启用ospf简单接口验证,sw1-sw2之间属于区域0,sw2-sw3之间属于区域1。
配置及描述4.1 Sw1配置[sw1]dis curr#sysname sw1#vlan batch 2 创建vlan2#interface Vlanif2 配置vlan2三层接口ip address 192.168.1.1 255.255.255.0ospf authentication-mode simple cipher WW{LBd#`\*939O4.`(ZGzBL# 启用ospf简单接口验证ospf cost 2 更改接口cost值为2ospf network-type p2p 更改接口网络类型为点到点# 4interface GigabitEthernet0/0/1port link-type access 将g0/0/1接口类型改为accessport default vlan 2 将g0/0/1加入到vlan2#interface NULL0#interface LoopBack0 创建环回口用在router-idip address 10.0.0.1 255.255.255.255#ospf 1 router-id 10.0.0.1 启用ospf进程1、router-id为10.0.0.1 import-route static type 1 导入外部静态路由并指定为类型1area 0.0.0.0 区域0配置视图network 192.168.1.1 0.0.0.0 配置区域0包含的网段ip route-static 172.16.1.0 255.255.255.0 NULL0 用于引入ospf的静态路由#4.2 Sw2配置[sw2]dis curr#sysname sw2#vlan batch 2 to 3#interface Vlanif2ip address 192.168.1.2 255.255.255.0ospf authentication-mode simple cipher VK=()kMc"Dpe}@HMNPn@!C!#ospf cost 2ospf network-type p2p#interface Vlanif3ip address 192.168.2.1 255.255.255.0ospf cost 2ospf network-type p2pinterface GigabitEthernet0/0/1port link-type accessport default vlan 2#interface GigabitEthernet0/0/2port link-type accessport default vlan 3#interface LoopBack0ip address 10.0.0.2 255.255.255.255 ospf 1 router-id 10.0.0.2area 0.0.0.0network 192.168.1.2 0.0.0.0area 0.0.0.1network 192.168.2.1 0.0.0.0#4.3 Sw3配置[sw3]dis curr#sysname sw3#vlan batch 3#interface Vlanif3ip address 192.168.2.2 255.255.255.0ospf cost 2ospf network-type p2p#interface GigabitEthernet0/0/2port link-type accessport default vlan 3#interface LoopBack0ip address 10.0.0.3 255.255.255.255#ospf 1 router-id 10.0.0.3area 0.0.0.1network 192.168.2.2 0.0.0.0#5 配置查看验证5.1 查看sw2的ospf邻居5.2 查看sw2上启用ospf的接口详细信息5.3 查看sw1的ospf进程信息从上图可知:sw1由于引入了外部静态路由而显示Border Router:AS(自制系统边界路由器)。
思科OSPF区域认证2008-02-16 14:21命令:--------------------------------1、明码认证:Router1(config)# area [区域ID] authenticationRouter1(config)# int 接口Router1(config-if)# ip ospf authentication-key [密码]2、加密认证(MD5):Router1(config)# area [区域ID] authentication message-digestRouter1(config)# int 接口Router1(config-if)# ip ospf message-digest-key [Key-ID] authentication [密码] //Key-ID:密匙链ID,取值1-255,验证双方需一样具体实例:----------------------------连接如图区域0 明文认证区域1 MD5认证R1 的配置如下interface Loopback0ip address 1.1.1.1 255.255.255.0!interface FastEthernet0/0no ip addressshutdownduplex autospeed auto!interface Serial1/0no ip addressshutdownno fair-queueserial restart-delay 0!interface Serial1/1ip address 12.1.1.1 255.255.255.0ip ospf authentication-key 123serial restart-delay 0clock rate 64000!interface Serial1/2no ip addressshutdownserial restart-delay 0!interface Serial1/3no ip addressshutdownserial restart-delay 0!router ospf 1log-adjacency-changesarea 0 authenticationnetwork 1.1.1.1 0.0.0.0 area 0 network 12.1.1.1 0.0.0.0 area 0 !ip classlessip http server!!line con 0exec-timeout 0 0logging synchronousline aux 0line vty 0 4login!endR2 的配置如下:interface FastEthernet0/0no ip addressshutdownduplex autospeed auto!interface Serial1/0ip address 12.1.1.2 255.255.255.0 ip ospf authentication-key 123 serial restart-delay 0clock rate 64000!interface Serial1/1ip address 23.1.1.1 255.255.255.0ip ospf authentication-key 1 md5 123 serial restart-delay 0clock rate 64000!interface Serial1/2no ip addressshutdownserial restart-delay 0!interface Serial1/3no ip addressshutdownserial restart-delay 0!router ospf 1log-adjacency-changesarea 0 authenticationarea 1 authentication message-digest network 12.1.1.2 0.0.0.0 area 0 network 23.1.1.1 0.0.0.0 area 1!ip classlessip http server!!line con 0exec-timeout 0 0logging synchronousline aux 0line vty 0 4login!endR3 的配置如下:interface Loopback0ip address 3.3.3.3 255.255.255.0!interface FastEthernet0/0no ip addressshutdownduplex autospeed auto!interface Serial1/0ip address 23.1.1.2 255.255.255.0ip ospf authentication-key 1 md5 123 serial restart-delay 0clock rate 64000!interface Serial1/1no ip addressshutdownserial restart-delay 0!interface Serial1/2no ip addressshutdownserial restart-delay 0!interface Serial1/3no ip addressshutdownserial restart-delay 0!router ospf 1log-adjacency-changesarea 1 authentication message-digest network 3.3.3.3 0.0.0.0 area 1 network 23.1.1.2 0.0.0.0 area 1!ip classlessip http server!!line con 0exec-timeout 0 0logging synchronousline aux 0line vty 0 4login!end。
OSPF Authentication配置详解在IOS12.0以前,如果在一个OSPF Area内任意一个接口上配置了认证,则所有area内的其它路由器的所有接口也必须配置认证。
在IOS12.0以后,允许在单独在一个接口上配置认证,与area内其它路由器无关。
命令语法:ip ospf authentication-key passwordip ospf message-digest-key key-id md5 passwordpassword:在特定接口、区域或Virtual Link上用于密码认证。
可以是1-8个字符串。
key-id:用于加密密码的密钥。
取值范围1-255。
key-id匹配检测是从小的ID到大的ID的。
大的ID被称为youngest-id。
key-id是基于接口、Virtual-link的,每个接口都有相应的一个key-id范围,相互之间key-id是分别开来的。
当ospf收到一个ospf packet时:1>检测packet中的认证类型与当前接口、链路或区域配置是否匹配。
0为无认证,1为明文认证,2为MD5认证。
2>检测packet中的密码是否匹配,如果是MD5认证则从key-id小的开始,找到一个匹配则结束。
无匹配则不能建立Adjacency关系。
链路两端必须配置相同的password和key-id。
Part I. AREA级明文认证!host r1description conn_to_r2ip add 192.168.1.1 255.255.255.0ip ospf authentication-key cisco!router ospf 100router-id 10.0.0.1net 192.168.1.0 0.0.0.255 area 0area 0 authentication!-------------------------------------------- !host r2!int s1/0description conn_to_r1ip add 192.168.1.2 255.255.255.0ip ospf authentication-key cisco!router ospf 100router-id 10.0.0.2net 192.168.1.0 0.0.0.255 area 0area 0 authentication!++++++++++++++++++++++++++++++service password-encryptionshow ip ospf neighbordebug ip ospf events++++++++++++++++++++++++++++++Part II. AREA级md5认证!host r1!int s1/0description conn_to_r2ip add 192.168.1.1 255.255.255.0ip ospf message-digest-key 1 md5 cisco!router ospf 100router-id 10.0.0.1net 192.168.1.0 0.0.0.255 area 0area 0 authentication message-digest!---------------------------------------------!int s1/0description conn_to_r1ip add 192.168.1.2 255.255.255.0ip ospf message-digest-key 1 md5 cisco!router ospf 100router-id 10.0.0.2net 192.168.1.0 0.0.0.255 area 0area 0 authentication message-digest!Part III. AREA级md5认证切换因为md5认证在收到时是从认证密码池中依次匹配密码的(密码ID从小到大),所以它可以同时配置多个密码,进而可以实现在多个密码中平滑的过度。
步骤 1. 将R1 配置为使用OSPF 简单身份验证。
要在R1 上启用简单身份验证,请在全局配置提示符下使用router ospf 1 命令进入路由器配置模式。
然后发出area 0 authentication 命令以启用身份验证。
R1(config)#router ospf 1
R1(config-router)#area 0 authentication
00:02:30: %OSPF-5-ADJCHG: Process 1, Nbr 10.2.2.1 on Serial0/0/0 from FULL to
DOWN, Neighbor Down: Dead timer expired
00:02:30: %OSPF-5-ADJCHG: Process 1, Nbr 10.2.2.1 on Serial0/0/0 from FULL to
Down: Interface down or detached
area 0 authentication命令可对区域0 中的所有接口启用身份验证。
通常,在R1 上只需使用该命令便可成功配置身份验证,因为R1 无须支持任何其它类型的身份验证。
最后,您将看到一条说明R1 与R2 的相邻关系已解除的控制台消息。
R1 路由表中的所有OSPF 路由全都消失,直至它能够向R2 验证路由。
即使未配置口令,R1 仍会要求所有邻居在OSPF 路由消息和更新中使用身份验证。
要为R1 配置简单身份验证口令,请进入连接至R2 的链路所对应的接口配置模式。
然后发出 ip ospf authentication-key cisco123命令。
该命令将身份验证口令设置
为cisco123。
R1(config-router)#interface S0/0/0
R1(config-if)#ip ospf authentication-key cisco123
步骤 2. 将R2 配置为使用OSPF 简单身份验证。
您已经在R1 上为整个区域配置了身份验证。
由于R2 同时支持简单身份验证和MD5 身份验证,因此应在接口级别输入命令。
进入接口S0/0/0 的接口配置模式。
利用ip ospf authentication 命令指明您要使用简单身份验证。
然后发出ip ospf authentication-key cisco123命令将身份验证口令设置
为cisco123。
R2(config)#interface S0/0/0
R2(config-if)#ip ospf authentication
R2(config-if)#ip ospf authentication-key cisco123
完成上述配置任务之后,您应该会看到一条控制台消息,该消息表明R1 与R2 之间的相邻关系已重新建立。
OSPF 路由被重新加入路由表中。
步骤 1. 将R3 配置为使用OSPF MD5 身份验证。
要在R3 上启用MD5 身份验证,请在全局配置提示符下使用router ospf 1命令进入路由器配置模式。
然后发出area 0 authentication message-digest命令以启用身份验证。
R3(config)#router ospf 1
R3(config-router)#area 0 authentication message-digest
00:10:00: %OSPF-5-ADJCHG: Process 1, Nbr 10.2.2.1 on Serial0/0/1 from FULL to
DOWN, Neighbor Down: Dead timer expired
00:10:00: %OSPF-5-ADJCHG: Process 1, Nbr 10.2.2.1 on Serial0/0/1 from FULL to
Down: Interface down or detached
最后,您将看到一条说明与R2 的相邻关系已解除的控制台消息。
R3 路由表中的所有OSPF 路由全都消失,直至它能够向R2 验证路由。
要为R3 配置MD5 身份验证口令,请进入连接至R2 的链路所对应的接口配置模式。
然后发出ip ospf message-digest-key 1 md5 cisco123命令。
该命令将OSPF 身份验
证口令设置为cisco123,并使用MD5 算法加以保护。
R3(config-router)#interface S0/0/1
R3(config-if)#ip ospf message-digest-key 1 md5 cisco123
步骤 2. 将R2 配置为使用OSPF MD5 身份验证。
进入串行接口0/0/1,发出ip ospf authentication message-digest命令以启用MD5 身
份验证。
发出ip ospf message-digest-key 1 md5 cisco123命令设置身份验证口令。
R2(config)#interface S0/0/1
R2(config-if)#ip ospf authentication message-digest
R2(config-if)#ip ospf message-digest-key 1 md5 cisco123
00:13:51: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.30.1 on Serial0/0/1 from EXCHANGE to FULL, Exchange Done。