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

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

    二、拓扑图:

    三、具体步骤配置:

    (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

    R1(config-if)#ip ospf authentication-key 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

    R2(config-if)#ip ospf authentication-key 123

    R2(config-if)#end

    四、验证测试:

    (1)检查端口是否启用了简单口令认证。

    红色标记处表明该端口启用了简单口令认证。

    (2)如果R1 的s0/0/0 接口启动简单口令认证,R2 的s0/0/0 接口没有启动认证,则
    R2 上出现下面的信息:
    *Feb 10 11:19:33.074: OSPF: Rcv pkt from 192.168.12.1, Serial0/0/0 : Mismatch
    Authentication type. Input packet specified type 1, we use type 0
    (3)如果R1 和R2 的s0/0/0 都启动简单口令认证,但是R2 的接口下没有配置认证密
    码或密码错误,则R2 上出现下面的信息:
    *Feb 10 11:22:33.074: OSPF: Rcv pkt from 192.168.12.1, Serial0/0/0 : Mismatch
    Authentication Key - Clear Text

  • 相关阅读:
    Now Task
    数据库的死锁及解决
    Java小对象的解决之道——对象池(Object Pool)的设计与应用
    Java中的对象池技术
    npm install时报错 npm ERR!Windows_NT 6.1.7601
    Angular 入门学习
    React 之 Hello world
    react webpack.config.js 入门学习
    React/React Native 的ES5 ES6写法对照表
    ES5和ES6中对于继承的实现方法
  • 原文地址:https://www.cnblogs.com/evolve/p/9233446.html
Copyright © 2011-2022 走看看