Packet Tracer配置PAP&CHAP认证双向

Packet Tracer配置PAP&CHAP认证双向

拓扑图:

 

设备参数:

设备

接口

IP地址

子网掩码

默认网关

R1

S0/0/0

192.168.12.1

255.255.255.0

N/A

R2

S0/0/0

192.168.12.1

255.255.255.0

N/A

S0/0/1

192.168.23.2

255.255.255.0

N/A

R3

S0/0/0

192.168.23.3

255.255.255.0

N/A

实验步骤:

Router>enable

Router#conf t

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

Router(config)#hostname R1

R1(config)#username R2 password cisco

R1(config)#INTerface Serial 0/0/0

R1(config-if)#ip address 192.168.12.1 255.255.255.0

R1(config-if)#encapsulation ppp

R1(config-if)#ppp pap sent-username R1 password cisco

R1(config-if)#no shutdown

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

R1(config-if)#exit

Router>enable

Router#conf t

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

Router(config)#hostname R2

R2(config)#username R1 password cisco

R2(config)#username R3 password cisco

R2(config)#interface s0/0/0

R2(config-if)#clock rate 128000

R2(config-if)#ip address 192.168.12.2 255.255.255.0

R2(config-if)#encapsulation ppp

R2(config-if)#ppp authentication pap

R2(config-if)#ppp pap sent-username R2 password cisco

R2(config-if)#no shutdown

R2(config-if)#

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

%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed state to up

R2(config-if)#exit

R2(config)#interface s0/0/1

R2(config-if)#clock rate 128000

R2(config-if)#ip add

R2(config-if)#ip address 192.168.23.2 255.255.255.0

R2(config-if)#encapsulation ppp

R2(config-if)#ppp authentication chap

R2(config-if)#no shutdown

R2(config-if)#end

R2#

%SYS-5-CONFIG_I: Configured from console by console

Router>enable

Router#conf t

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

Router(config)#hostname R3

R3(config)#username R2 password cisco

R3(config)#interface s0/0/0

R3(config-if)#ip address 192.168.23.3 255.255.255.0

R3(config-if)#encapsulation ppp

R3(config-if)#ppp authentication chap

R3(config-if)#no shutdown

实验验证:

R1#show ip interface brief

Interface IP-Address OK? Method Status Protocol

GigabitEthernet0/0 unassigned YES unset administratively down down

GigabitEthernet0/1 unassigned YES unset administratively down down

Serial0/0/0 192.168.12.1 YES manual up up

Serial0/0/1 unassigned YES unset administratively down down

Vlan1 unassigned YES unset administratively down down

R1#ping 192.168.12.2

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.12.2, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 1/4/12 ms

R1#

R2#show ip interface brief

Interface IP-Address OK? Method Status Protocol

GigabitEthernet0/0 unassigned YES unset administratively down down

GigabitEthernet0/1 unassigned YES unset administratively down down

Serial0/0/0 192.168.12.2 YES manual up up

Serial0/0/1 192.168.23.2 YES manual up up

Vlan1 unassigned YES unset administratively down down

R2#ping 192.168.12.1

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.12.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 1/6/16 ms

R2#ping 192.168.23.3

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.23.3, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 1/6/9 ms

R2#

R3#show ip interface brief

Interface IP-Address OK? Method Status Protocol

GigabitEthernet0/0 unassigned YES unset administratively down down

GigabitEthernet0/1 unassigned YES unset administratively down down

Serial0/0/0 192.168.23.3 YES manual up up

Serial0/0/1 unassigned YES unset administratively down down

Vlan1 unassigned YES unset administratively down down

R3#

R3#ping 192.168.23.2

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.23.2, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/5 ms

通过show ip interface brief可发现端口和协议都是up的,这样实验就算完成了。

不积跬步无以至千里不积小流无以成江海

千里之行,始于足下;

每天一个小实验。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

傻傻的心动

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值