zoukankan      html  css  js  c++  java
  • 路由器配置——基于链路的OSPF的MD5口令认证

     一、实验目的:掌握基于链路的OSPFMD5口令认证

    二、拓扑图:

    三、具体步骤配置:

    (1)R1路由器的配置

    Router>enable

    Router#configure terminal

    Enter configuration commands, one per line. End with CNTL/Z.

    Router(config)#hostname R1

    R1(config)#interface s0/0/0

    R1(config-if)#ip address 192.168.1.1 255.255.255.0

    R1(config-if)#clock rate 64000

    R1(config-if)#no shutdown

    %LINK-5-CHANGED: Interface Serial0/0/0, changed state to down

    R1(config-if)#exit

    R1(config)#interface l0 

    R1(config-if)#ip address 1.1.1.1 255.255.255.0

    R1(config-if)#no shutdown

    R1(config-if)#exit

    R1(config)#router ospf 1

    R1(config-router)#router-id 1.1.1.1

    R1(config-router)#network 192.168.1.0 0.0.0.255 area 0

    R1(config-router)#network 1.1.1.0 0.0.0.255 area 0

    R1(config-router)#interface s0/0/0

    R1(config-if)#ip ospf authentication message-digest

    R1(config-if)#ip ospf message-digest-key 1 md5 123

    R1(config-if)#end

    (2)R2路由器的配置

    Router>enable

    Router#configure terminal

    Enter configuration commands, one per line. End with CNTL/Z.

    Router(config)#hostname R2

    R2(config)#interface s0/0/0

    R2(config-if)#ip address 192.168.1.2 255.255.255.0

    R2(config-if)#clock rate 64000

    This command applies only to DCE interfaces

    R2(config-if)#no shutdown

    R2(config-if)#exit

    R2(config)#interface l0

    R2(config-if)#ip address 2.2.2.2 255.255.255.0

    R2(config-if)#no shutdown 

    R2(config-if)#exit 

    R2(config)#router ospf 1

    R2(config-router)#router-id 2.2.2.2

    R2(config-router)#network 192.168.1.0 0.0.0.255 area 0

    R2(config-router)#network 2.2.2.0 0.0.0.255 area 0

    R2(config-router)#interface s0/0/0

    R2(config-if)#ip ospf authentication message-digest

    R2(config-if)#ip ospf message-digest-key 1 md5 123

    R2(config-if)#end

    四、验证要求:

    (1)检查端口是否启用了MD5 认证,密钥为多少

    红色标记处表示该端口启用了MD5 认证,而且密钥ID 为1。

    (2)如果R1 的s0/0/0 启动MD5 认证,而R2s0/0/0 启动简单口令认证,则R2 上出现
    下面的信息:
    *Feb 10 11:08:13.075: OSPF: Rcv pkt from 192.168.12.1, Serial0/0/0 : Mismatch
    Authentication type. Input packet specified type 2, we use type 1
    (3)如果R1 和R2 的s0/0/0 都启动MD5 认证,但是R2 的接口下没有配置key ID 和密
    码,则R2 上出现下面的信息:
    *Feb 10 11:31:13.078: OSPF: Rcv pkt from 192.168.12.1, Serial0/0/0 : Mismatch
    Authentication Key - No message digest key 1 on interface

  • 相关阅读:
    机器学习笔记之K近邻算法
    [C++基础]在子类中向父类的构造函数传递参数的小例子,包括类中常量的初始化
    POJ2709 染料贪心
    POJ2337 欧拉路径字典序输出
    POJ2337 欧拉路径字典序输出
    POJ1042 贪心钓鱼
    POJ3228二分最大流
    POJ3228二分最大流
    POJ3498最大流,枚举终点,企鹅,基础最大流
    POJ3498最大流,枚举终点,企鹅,基础最大流
  • 原文地址:https://www.cnblogs.com/evolve/p/9233489.html
Copyright © 2011-2022 走看看