OSPF链路MD5认证

2024-06-18 16:48
文章标签 认证 链路 ospf md5

本文主要是介绍OSPF链路MD5认证,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

1、OSPF 链路MD5认证

 

a、在接口上配置

认证启动: ip ospfauthentication message-digest

认证密码:ip ospf message-digest-key1 md5 abc

 

b、认证成功,能建立邻居关系,不成功,不发送hello报文,不能建立邻居关系






R1配置

en
conf t
hostname R1int loopback 0
ip address 1.1.1.1 255.255.255.0
no shutdown
exitint f0/0
ip address 192.168.1.2 255.255.255.0
no shutdown
exitrouter ospf 1
network 192.168.1.0 0.0.0.255 area 0
network 192.168.2.0 0.0.0.255 area 0
network 1.1.1.0 0.0.0.255 area 0
exitint f0/1
ip address 192.168.2.1 255.255.255.0
ip ospf authentication message-digest
ip ospf message-digest-key 1 md5 abc
no shutdown
exit
end


 

 

R2配置

 

en
conf t
hostname R2int loopback 0
ip address 2.2.2.2 255.255.255.0
no shutdown
exitrouter ospf 1
network 192.168.3.0 0.0.0.255 area 0
network 192.168.2.0 0.0.0.255 area 0
network 2.2.2.0 0.0.0.255 area 0
exitint f0/1
ip address 192.168.2.2 255.255.255.0
ip ospf authentication message-digest
ip ospf message-digest-key 1 md5 abc
no shutdown
exitint f0/0
ip address 192.168.3.2 255.255.255.0
no shutdown
exit
end

 

 

 

R1#show ip ospf interface

FastEthernet0/0 is up, line protocol is up

 Internet address is 192.168.1.2/24, Area 0

 Process ID 1, Router ID 1.1.1.1, Network Type BROADCAST, Cost: 1

 Transmit Delay is 1 sec, State DR, Priority 1

 Designated Router (ID) 1.1.1.1, Interface address 192.168.1.2

  Nobackup designated router on this network

 Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5

   Hello due in 00:00:07

 Index 1/1, flood queue length 0

 Next 0x0(0)/0x0(0)

 Last flood scan length is 1, maximum is 1

 Last flood scan time is 0 msec, maximum is 0 msec

 Neighbor Count is 0, Adjacent neighbor count is 0

 Suppress hello for 0 neighbor(s)

Loopback0 is up, line protocol is up

 Internet address is 1.1.1.1/24, Area 0

 Process ID 1, Router ID 1.1.1.1, Network Type LOOPBACK, Cost: 1

 Loopback interface is treated as a stub Host

FastEthernet0/1 is up, line protocol is up

 Internet address is 192.168.2.1/24, Area 0

 Process ID 1, Router ID 1.1.1.1, Network Type BROADCAST, Cost: 1

 Transmit Delay is 1 sec, State BDR, Priority 1

 Designated Router (ID) 2.2.2.2, Interface address 192.168.2.2

 Backup Designated Router (ID) 1.1.1.1, Interface address 192.168.2.1

 Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5

   Hello due in 00:00:07

 Index 3/3, flood queue length 0

 Next 0x0(0)/0x0(0)

 Last flood scan length is 1, maximum is 1

 Last flood scan time is 0 msec, maximum is 0 msec

 Neighbor Count is 1, Adjacent neighbor count is 1

   Adjacent with neighbor 2.2.2.2 (Designated Router)

 Suppress hello for 0 neighbor(s)

 Message digest authentication enabled

   Youngest key id is 1

 

解释:Message digest authentication enabled链路认证md5启动

 

 

 

 

R1#show ip ospf neighbor

 

Neighbor ID     Pri  State           Dead Time   Address         Interface

2.2.2.2           1  FULL/DR         00:00:32    192.168.2.2     FastEthernet0/1

 

 

 

 

R1#show ip ospf database

           OSPF Router with ID (1.1.1.1) (Process ID 1)

 

                Router Link States (Area 0)

 

Link ID         ADV Router      Age         Seq#       Checksum Link count

1.1.1.1         1.1.1.1         472         0x80000007 0x0022ba 3

2.2.2.2         2.2.2.2         472         0x80000008 0x00f1da 3

 

                Net Link States (Area 0)

Link ID        ADV Router      Age         Seq#       Checksum

192.168.2.2     2.2.2.2         549         0x80000002 0x00bae1

 

解释:认证成功,能建立邻居关系。


这篇关于OSPF链路MD5认证的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/1072555

相关文章

springboot security使用jwt认证方式

《springbootsecurity使用jwt认证方式》:本文主要介绍springbootsecurity使用jwt认证方式,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地... 目录前言代码示例依赖定义mapper定义用户信息的实体beansecurity相关的类提供登录接口测试提供一

SpringBoot实现MD5加盐算法的示例代码

《SpringBoot实现MD5加盐算法的示例代码》加盐算法是一种用于增强密码安全性的技术,本文主要介绍了SpringBoot实现MD5加盐算法的示例代码,文中通过示例代码介绍的非常详细,对大家的学习... 目录一、什么是加盐算法二、如何实现加盐算法2.1 加盐算法代码实现2.2 注册页面中进行密码加盐2.

SpringSecurity 认证、注销、权限控制功能(注销、记住密码、自定义登入页)

《SpringSecurity认证、注销、权限控制功能(注销、记住密码、自定义登入页)》SpringSecurity是一个强大的Java框架,用于保护应用程序的安全性,它提供了一套全面的安全解决方案... 目录简介认识Spring Security“认证”(Authentication)“授权” (Auth

Java实现MD5加密的四种方式

《Java实现MD5加密的四种方式》MD5是一种广泛使用的哈希算法,其输出结果是一个128位的二进制数,通常以32位十六进制数的形式表示,MD5的底层实现涉及多个复杂的步骤和算法,本文给大家介绍了Ja... 目录MD5介绍Java 中实现 MD5 加密方式方法一:使用 MessageDigest方法二:使用

一文详解kafka开启kerberos认证的完整步骤

《一文详解kafka开启kerberos认证的完整步骤》这篇文章主要为大家详细介绍了kafka开启kerberos认证的完整步骤,文中的示例代码讲解详细,感兴趣的小伙伴可以跟随小编一起学习一下... 目录一、kerberos安装部署二、准备机器三、Kerberos Server 安装1、配置krb5.con

SpringBoot项目注入 traceId 追踪整个请求的日志链路(过程详解)

《SpringBoot项目注入traceId追踪整个请求的日志链路(过程详解)》本文介绍了如何在单体SpringBoot项目中通过手动实现过滤器或拦截器来注入traceId,以追踪整个请求的日志链... SpringBoot项目注入 traceId 来追踪整个请求的日志链路,有了 traceId, 我们在排

java如何通过Kerberos认证方式连接hive

《java如何通过Kerberos认证方式连接hive》该文主要介绍了如何在数据源管理功能中适配不同数据源(如MySQL、PostgreSQL和Hive),特别是如何在SpringBoot3框架下通过... 目录Java实现Kerberos认证主要方法依赖示例续期连接hive遇到的问题分析解决方式扩展思考总

SpringBoot如何使用TraceId日志链路追踪

《SpringBoot如何使用TraceId日志链路追踪》文章介绍了如何使用TraceId进行日志链路追踪,通过在日志中添加TraceId关键字,可以将同一次业务调用链上的日志串起来,本文通过实例代码... 目录项目场景:实现步骤1、pom.XML 依赖2、整合logback,打印日志,logback-sp

浅析Spring Security认证过程

类图 为了方便理解Spring Security认证流程,特意画了如下的类图,包含相关的核心认证类 概述 核心验证器 AuthenticationManager 该对象提供了认证方法的入口,接收一个Authentiaton对象作为参数; public interface AuthenticationManager {Authentication authenticate(Authenti

【Kubernetes】K8s 的安全框架和用户认证

K8s 的安全框架和用户认证 1.Kubernetes 的安全框架1.1 认证:Authentication1.2 鉴权:Authorization1.3 准入控制:Admission Control 2.Kubernetes 的用户认证2.1 Kubernetes 的用户认证方式2.2 配置 Kubernetes 集群使用密码认证 Kubernetes 作为一个分布式的虚拟