配置PPP CHAP 认证

2.1 问题

  1. 如图配置IP地址
  2. 启用 CHAP 认证,用户名/密码为:HuaWei/CCIE
  3. 确保R1和R2之间可以互通

2.2 方案

使用eNSP搭建实验环境,如图-2所示。

图-2

2.3 步骤

实现此案例需要按照如下步骤进行。

1)配置IP地址,确保设备互通

    <Huawei>system-view     
    [Huawei]sysname R1
    [R1]interface Serial 4/0/0
    [R1-Serial4/0/0]ip add 192.168.12.1 24
    [R1-Serial4/0/0]quit
    <Huawei>system-view 
    [Huawei]sysname R2
    [R2]interface Serial 4/0/0
    [R2-Serial4/0/0]ip address  192.168.12.2 24
    [R2-Serial4/0/0]quit

2)配置CHAP 认证

    [R1]aaa
    [R1-aaa]local-user HuaWei password cipher CCIE //创建用户名和密码
    [R1-aaa]local-user HuaWei service-type ppp     // 指定用户的服务类型为PPP
    [R1-aaa]quit
    [R1]interface Serial 4/0/0
    [R1-Serial4/0/0]ppp authentication-mode chap //开启CHAP 认证
    [R1-Serial4/0/0]ppp chap user HuaWei          //指定用于CHAP认证的用户名
    [R1-Serial4/0/0]quit
    [R2]interface Serial 4/0/0
    [R2-Serial4/0/0]ppp chap user HuaWei          //被认证端使用的用户名
    [R2-Serial4/0/0]ppp chap password cipher CCIE //被认证端使用的密码
    [R2-Serial4/0/0]quit 
    [R2]interface Serial 4/0/0
    [R2-Serial4/0/0]shutdown                        //关闭接口
    [R2-Serial4/0/0]undo shutdown                  //打开接口

3)测试R1与R2之间的连通性

    [R2]ping 192.168.12.1
      PING 192.168.12.1: 56  data bytes, press CTRL_C to break
        Reply from 192.168.12.1: bytes=56 Sequence=1 ttl=255 time=60 ms
        Reply from 192.168.12.1: bytes=56 Sequence=2 ttl=255 time=10 ms
        Reply from 192.168.12.1: bytes=56 Sequence=3 ttl=255 time=20 ms
        Reply from 192.168.12.1: bytes=56 Sequence=4 ttl=255 time=20 ms
        Reply from 192.168.12.1: bytes=56 Sequence=5 ttl=255 time=20 ms
      --- 192.168.12.1 ping statistics ---
        5 packet(s) transmitted
        5 packet(s) received
        0.00% packet loss
        round-trip min/avg/max = 10/26/60 ms
发布了324 篇原创文章 · 获赞 12 · 访问量 8195

猜你喜欢

转载自blog.csdn.net/weixin_45843450/article/details/105572864
今日推荐