HCIP第一次网络实验-pap和chap认证

要求:

该实验需要用到串口模块,因此开启路由器前需手动加装串口模块

鼠标右键路由器找到设置,点击左键进入设置页面

找到2sa模块将其拖拽安装到路由器上

连线时注意不要使用自动连线,否则它会自动连接以太网口,但本实验需要连接的是串口,选择图中的serial选项,左键路由器选择串口将其连接

随后便可以开启路由器进行认证配置了

pap认证:

被认证方:

Please press enter to start cmd line!
##########
<AR1>
<AR1>
Oct 26 2023 23:14:12-08:00 AR1 %%01IFNET/4/LINK_STATE(l)[5]:The line protocol PP
P on the interface Serial4/0/0 has entered the UP state. 
<AR1>aaa
     ^
Error: Unrecognized command found at '^' position.
<AR1>sy  //进入系统视图
Enter system view, return user view with Ctrl+Z.
[AR1]aaa
[AR1-aaa]loc	
[AR1-aaa]local-user AR1 pa	
[AR1-aaa]local-user AR1 password c	
[AR1-aaa]local-user AR1 password cipher 123 // 创建认证账户和密码
Info: Add a new user.
[AR1-aaa]lo	
[AR1-aaa]local-user  ar1	
[AR1-aaa]local-user  ar1 s	
[AR1-aaa]local-user  ar1 service-type ppp  //设定账户类型为ppp
[AR1-aaa]ppp au	
[AR1-aaa]int s4/0/0  //进入接口视图
[AR1-Serial4/0/0]lin	
[AR1-Serial4/0/0]link-protocol ppp  //设定接口认证方式为ppp
[AR1-Serial4/0/0]ppp  au	
[AR1-Serial4/0/0]ppp  authentication-mode pap  //设置ppp加密方式为pap
[AR1-Serial4/0/0]ppp pap lo	
[AR1-Serial4/0/0]ppp pap local-user ar	
[AR1-Serial4/0/0]ppp pap local-user ar1 pa	
[AR1-Serial4/0/0]ppp pap local-user ar1 password c	
[AR1-Serial4/0/0]ppp pap local-user ar1 password cipher 123 //绑定账户和密码
[AR1-Serial4/0/0]ip ad ppp	
[AR1-Serial4/0/0]ip ad ppp-negotiate   //开启IP协商
[AR1-Serial4/0/0]
Oct 26 2023 23:16:38-08:00 AR1 %%01IFNET/4/LINK_STATE(l)[6]:The line protocol PP
P IPCP on the interface Serial4/0/0 has entered the UP state. 
[AR1-Serial4/0/0]dis ip in b    //查看接口IP
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 2
The number of interface that is DOWN in Physical is 4
The number of interface that is UP in Protocol is 2
The number of interface that is DOWN in Protocol is 4

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              unassigned           down       down      
GigabitEthernet0/0/1              unassigned           down       down      
GigabitEthernet0/0/2              unassigned           down       down      
NULL0                             unassigned           up         up(s)     
Serial4/0/0                       12.1.1.1/32          up         up        //12.1.1.1为认证方处设置的对端IP
Serial4/0/1                       unassigned           down       down      
[AR1-Serial4/0/0]

认证方:

The device is running!

<AR2>sy
Enter system view, return user view with Ctrl+Z.
[AR2]in s4/0/0
[AR2-Serial4/0/0]lin	
[AR2-Serial4/0/0]link-protocol ppp    //设置链路类型为ppp
[AR2-Serial4/0/0]ppp au	
[AR2-Serial4/0/0]ppp authentication-mode pap    //设置ppp加密方式为pap
[AR2-Serial4/0/0]re	
[AR2-Serial4/0/0]remote ad	
[AR2-Serial4/0/0]remote address 12.1.1.1     //设置对端IP
[AR2-Serial4/0/0]ppp pap lo	
[AR2-Serial4/0/0]ppp pap local-user ar1 pa	
[AR2-Serial4/0/0]ppp pap local-user ar1 password c	
[AR2-Serial4/0/0]ppp pap local-user ar1 password cipher 123    //绑定账号和密码
[AR2-Serial4/0/0]ip ad	
[AR2-Serial4/0/0]ip address 12.2.2.2 24    //自身IP地址
[AR2-Serial4/0/0]
Oct 26 2023 23:16:39-08:00 AR2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol PP
P IPCP on the interface Serial4/0/0 has entered the UP state. 
[AR2-Serial4/0/0]dis ip in b
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 3
The number of interface that is DOWN in Physical is 3
The number of interface that is UP in Protocol is 3
The number of interface that is DOWN in Protocol is 3

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              15.1.1.2/24          down       down      
GigabitEthernet0/0/1              unassigned           down       down      
GigabitEthernet0/0/2              unassigned           down       down      
NULL0                             unassigned           up         up(s)     
Serial4/0/0                       12.2.2.2/24          up         up        
Serial4/0/1                       unassigned           up         up        

chap认证:

认证方:

The device is running!

<AR3>sy    //进入系统视图
Enter system view, return user view with Ctrl+Z.
[AR3]lo	
[AR3]aaa
[AR3-aaa]lo	
[AR3-aaa]local-user AR3 pa	
[AR3-aaa]local-user AR3 password c	
[AR3-aaa]local-user AR3 password cipher 123    //创建账号和密码
Info: Add a new user.
[AR3-aaa]int s4/0/0
[AR3-Serial4/0/0]link	
[AR3-Serial4/0/0]link-protocol ppp    //更改链路类型为ppp
[AR3-Serial4/0/0]ppp au	
[AR3-Serial4/0/0]ppp authentication-mode cha	
[AR3-Serial4/0/0]ppp authentication-mode chap     //设置ppp加密方式为cghap
[AR3-Serial4/0/0]ppp ca	
[AR3-Serial4/0/0]ppp c	
[AR3-Serial4/0/0]ppp chap us	
[AR3-Serial4/0/0]ppp chap user ar3     //设置认证名-为刚刚创建用户的用户名
[AR3-Serial4/0/0]ip ad ppp	
[AR3-Serial4/0/0]ip ad ppp-negotiate     //开启IP协商
[AR3-Serial4/0/0]
Oct 26 2023 23:20:03-08:00 AR3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol PP
P IPCP on the interface Serial4/0/0 has entered the UP state. 
[AR3-Serial4/0/0]dis ip in b    //查看接口ip
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 2
The number of interface that is DOWN in Physical is 4
The number of interface that is UP in Protocol is 2
The number of interface that is DOWN in Protocol is 4

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              unassigned           down       down      
GigabitEthernet0/0/1              unassigned           down       down      
GigabitEthernet0/0/2              unassigned           down       down      
NULL0                             unassigned           up         up(s)     
Serial4/0/0                       12.3.3.3/32          up         up        //12.3.3.3为被认证方设置的对端IP
Serial4/0/1                       unassigned           down       down      

被认证方:

[AR2-GigabitEthernet0/0/0]int  s 4/0/1    //进入接口视图
[AR2-Serial4/0/1]lin	
[AR2-Serial4/0/1]link-protocol ppp    //更改链路类型为ppp
[AR2-Serial4/0/1]ppp au	
[AR2-Serial4/0/1]ppp authentication-mode c	    //设置ppp加密方式为chap
[AR2-Serial4/0/1]rem	
[AR2-Serial4/0/1]remote ad	
[AR2-Serial4/0/1]remote address  12.3.3.3    //设置对端IP
[AR2-Serial4/0/1]ppp c	
[AR2-Serial4/0/1]ppp chap us	
[AR2-Serial4/0/1]ppp chap user ar3     //认证名确认-为认证方创建的账号名
[AR2-Serial4/0/1]ppp c	
[AR2-Serial4/0/1]ppp chap pa	
[AR2-Serial4/0/1]ppp chap password c	
[AR2-Serial4/0/1]ppp chap password cipher 123    //认证密码确认为密文密码(cipher)-为认证放创建账号的密码
[AR2-Serial4/0/1]ip ad 12.4.4.4 24    //自身IP地址
[AR2-Serial4/0/1]
Oct 26 2023 23:20:03-08:00 AR2 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol PP
P IPCP on the interface Serial4/0/1 has entered the UP state. 
[AR2-Serial4/0/1]dis ip int b    //查看接口IP
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 3
The number of interface that is DOWN in Physical is 3
The number of interface that is UP in Protocol is 3
The number of interface that is DOWN in Protocol is 3

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              unassigned           down       down      
GigabitEthernet0/0/1              unassigned           down       down      
GigabitEthernet0/0/2              unassigned           down       down      
NULL0                             unassigned           up         up(s)     
Serial4/0/0                       12.2.2.2/24          up         up        
Serial4/0/1                       12.4.4.4/24          up         up        

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值