• 实训十八:RIP2邻居认证


    一、实验目的

    1.掌握邻居认证的配置
    2.理解 RIP-2 与 RIP-1 的不同

    二、应用环境

    1.为避免外部路由器得到路由表,保证一定安全性,采用认证

    三、实验设备

    1.DCR-2655 两台
    2.网线(交叉线) 三条

    四、实验拓扑

    在这里插入图片描述

    五、实验要求

    在这里插入图片描述

    六、 实验步骤

    第一步:按照上表,配置路由器的所有接口地址并测试连通性

    Router_config#hostname Router-A
    Router-A_config#interface g0/3
    Router-A_config_g0/3#ip address 192.168.1.1 255.255.255.0
    Router-A_config_g0/3#exit
    Router-A_config#interface g0/4
    Router-A_config_g0/4#ip address 192.168.0.1 255.255.255.0
    Router-A_config_g0/4#exit
    RB 配置如上
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8

    第二步:配置路由器 B

    Router-B#conf
    Router-B_config#router rip
    Router-B_config_rip#version 2 !配置为版本 2
    Router-B_config_rip#network 192.168.1.0
    Router-B_config_rip#network 192.168.2.0
    Router-B_config_rip#exit
    Router-B_config#int g0/3!进入与 A 相连的接口
    Router-B_config_g0/3#ip rip authentication simple !配置以明文方式验证
    Router-B_config_g0/3#ip rip password dcn !配置密码为 dcn
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9

    第三步:查看 B 的配置

    Router-B#show run 
    Building configuration...
    Current configuration:
    !
    !version 1.3.3H
    service timestamps log date
    service timestamps debug date
    no service password-encryption
    !
    hostname Router-B
    !
    gbsc group default
    ! 
    interface FastEthernet0/0
    no ip address
    no ip directed-broadcast
    !
    interface GigaEthernet0/3
    ip address 192.168.1.2 255.255.255.0
    no ip directed-broadcast
     ip rip authentication simple 
     ip rip password dcn 
    !
    interface GigaEthernet0/4
    ip address 192.168.2.1 255.255.255.0
    no ip directed-broadcast
    !
    interface GigaEthernet0/5
    no ip address
    no ip directed-broadcast
    !
    interface GigaEthernet0/6
    no ip address
    no ip directed-broadcast
    !
    interface Serial0/1
    no ip address
    no ip directed-broadcast
    !
    interface Serial0/2
    no ip address
    no ip directed-broadcast
    !
    interface Async0/0
    no ip address
    no ip directed-broadcast
    !
    router rip
    version 2 
    network 192.168.1.0
    network 192.168.2.0
    !
    Router-B#
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52
    • 53

    第四步:配置路由器 A(不配认证)并查看路由表

    Router-A#conf
    Router-A_config#router rip
    Router-A_config_rip#version 2 
    Router-A_config_rip#network 192.168.0.0
    Router-A_config_rip#network 192.168.1.0
    Router-A_config_rip#exit 
    查看路由表
    Router-A#show ip route
    Codes: C - connected, S - static, R - RIP, B - BGP, BC - BGP connected
     D - BEIGRP, DEX - external BEIGRP, O - OSPF, OIA - OSPF inter area
     ON1 - OSPF NSSA external type 1, ON2 - OSPF NSSA external type 2
     OE1 - OSPF external type 1, OE2 - OSPF external type 2
     DHCP - DHCP type, L1 - IS-IS level-1, L2 - IS-IS level-2
    VRF ID: 0
    C 192.168.0.0/24 is directly connected, GigaEthernet0/4
    C 192.168.1.0/24 is directly connected, GigaEthernet0/3
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16

    第五步:配置 A 的认证

    Router-A_config#int g0/3 !进入与 B 相连的接口
    Router-A_config_g0/3#ip rip authentication simple
    Router-A_config_g0/3#ip rip password dcn
    第六步:再次查看路由表
    Router-A#show ip route
    Codes: C - connected, S - static, R - RIP, B - BGP, BC - BGP connected
     D - BEIGRP, DEX - external BEIGRP, O - OSPF, OIA - OSPF inter area
     ON1 - OSPF NSSA external type 1, ON2 - OSPF NSSA external type 2
     OE1 - OSPF external type 1, OE2 - OSPF external type 2
     DHCP - DHCP type, L1 - IS-IS level-1, L2 - IS-IS level-2
     VRF ID: 0
    C 192.168.0.0/24 is directly connected, GigaEthernet0/4
    C 192.168.1.0/24 is directly connected, GigaEthernet0/3
    R 192.168.2.0/24 [120,1] via 192.168.1.2(on GigaEthernet0/3) 
    Router-B#show ip route
    Codes: C - connected, S - static, R - RIP, B - BGP, BC - BGP connected
     D - BEIGRP, DEX - external BEIGRP, O - OSPF, OIA - OSPF inter area
     ON1 - OSPF NSSA external type 1, ON2 - OSPF NSSA external type 2
     OE1 - OSPF external type 1, OE2 - OSPF external type 2
     DHCP - DHCP type, L1 - IS-IS level-1, L2 - IS-IS level-2
    VRF ID: 0
    R 192.168.0.0/24 [120,1] via 192.168.1.1(on GigaEthernet0/3)
    C 192.168.1.0/24 is directly connected, GigaEthernet0/3
    C 192.168.2.0/24 is directly connected, GigaEthernet0/4
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24

    七、 注意事项和排错

    1. 只有 RIP-2 才支持认证
    2. 在相邻的接口上配置认证
    3. 认证密码要一致,必须是双向的

    八、相关配置命令详解

    ip rip authentication
    使用 ip rip authentication 接口配置命令指定用于 RIP-2 包的认证类型,
    no ip rip authentication 则不对报文进行认证。
    *ip rip authentication {simple | message-digest}

    no ip rip authentication**

    在这里插入图片描述

    缺省 : 不认证

    命令模式 : 接口配置状态

    使用说明 :RIP-1 不支持认证。

    示例:这个例子配置接口使用 MD5 密文认证类型。

    ip rip authentication message-digest
    相关命令

    ip rip password
    ip rip message-digest-key

    ip rip password
    使用 ip rip password 接口配置命令激活对 RIP-2 包的认证并指定在该接口上使用的明文
    认证密钥,no ip rip password 则防止认证。
    ip rip password password
    no ip rip pssword password

    在这里插入图片描述

    缺省: 无认证。
    命令模式:接口配置状态
    使用说明 :如果没有用 ip rip password 配置过任何密钥,在接口上则不执行任何认证。
    示例:这个例子配置接口可以接受和发送属于密钥 mykey 的任何明文认证报文。
    ip rip password mykey
    相关命令
    ip rip authentication

  • 相关阅读:
    xxl-job做集群的时候,用F5做负载均衡效率高还是直接写死几个服务器地址的效率高?
    微软同“亲女儿”小冰单飞后的再联手,AI 数字员工可行吗?
    Flink SQL Hudi 实战
    苹果手机相册怎么全部删除照片?这样做快人一步
    【Mysql系列】(二)日志系统:一条更新语句是如何执行的
    R语言将向量横向转换为单行数据框,随后整合数量不确定的数据框
    (部署服务器系列二)服务器上安装springboot运行环境,发布并运行项目
    CSDN学院 < 华为战略方法论进阶课 > 正式上线!
    死锁是什么?有什么条件?怎样处理?
    Maven最新版的下载与安装教程
  • 原文地址:https://blog.csdn.net/weixin_60462069/article/details/127438981