HCNA|ensp ppp数据抓包 查看接口用户名和密码

HCNA|ensp ppp数据抓包 查看接口用户名和密码
文章图片

1.基本配置
使用ping命令检验4各直连链路的连通性
[r1]ping 10.0.1.1
PING 10.0.1.1: 56 data bytes, press CTRL_C to break

Reply from 10.0.1.1: bytes=56 Sequence=1ttl=128 time=200 msReply from 10.0.1.1: bytes=56 Sequence=2ttl=128 time=30 msReply from 10.0.1.1: bytes=56 Sequence=3ttl=128 time=10 msReply from 10.0.1.1: bytes=56 Sequence=4ttl=128 time=20 msReply from 10.0.1.1: bytes=56 Sequence=5ttl=128 time=20 ms

— 10.0.1.1 ping statistics —
5 packet(s) transmitted5 packet(s) received0.00% packet lossround-trip min/avg/max = 10/56/200 ms

联通性正常。
2.搭建ospf网络
[r1]ospf 1
[r1-ospf-1]area 0
[r1-ospf-1-area-0.0.0.0]network
10.0.13.0 0.0.0.255
[r1-ospf-1-area-0.0.0.0]network
10.0.1.0 0.0.0.255
[r1-ospf-1-area-0.0.0.0]
[r2]
[r2]ospf 1
[r2-ospf-1]area 0
[r2-ospf-1-area-0.0.0.0]network
10.0.23.0 0.0.0.255
[r2-ospf-1-area-0.0.0.0]network
10.0.2.0 0.0.0.255
[r3]ospf 1
[r3-ospf-1]area 0
[r3-ospf-1-area-0.0.0.0]network
10.0.23.0 0.0.0.255
[r3-ospf-1-area-0.0.0.0]network
10.0.13.0 0.0.0.255
配置完成后测试总部与分支终端的连通性
PC>ping 10.0.2.1
Ping 10.0.2.1: 32 data
bytes, Press Ctrl_C to break
From 10.0.2.1: bytes=32
seq=1 ttl=125 time=32 ms
From 10.0.2.1: bytes=32
seq=2 ttl=125 time=31 ms
From 10.0.2.1: bytes=32
seq=3 ttl=125 time=31 ms
From 10.0.2.1: bytes=32
seq=4 ttl=125 time=31 ms
From 10.0.2.1: bytes=32
seq=5 ttl=125 time=32 ms
— 10.0.2.1 ping statistics 5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 31/31/32 ms
可以观察联通正常
3.配置ppp的pap认证
在总部设备上使用ppp
authentication-mode命令设置本段的ppp协议认证方式为pap,认证采用的域名为huawei
[r3]int serial 4/0/0
[r3-Serial4/0/0]ppp
authentication-mode pap domain huawei
接下来配置认证路由器r3的本地认证过信息
执行aaa命令,进入aaa视图
[r3]aaa
使用authentication-scheme
命令创建认证方案为huawei_1
[r3-aaa]authentication-scheme
huawei_1
Info: Create a new
authentication scheme.
使用authentication-mode
命令配置认证模式为本地认证
[r3-aaa-authen-huawei_1]authentication-mode
local
使用domain
命令创建huaweiyu
[r3-aaa]domain huaweiyu
Info: Success to create a
new domain.
使用authentication-scheme
命令配置认证方案huawei_1
[r3-aaa-domain-huaweiyu]authentication-scheme
huawei_1
[r3-aaa-domain-huaweiyu]quit
[r3-aaa]local-user
r1@huaweiyu password cipher hauwei
Info: Add a new user.
[r3-aaa]local-user
r1@huaweiyu service-type ppp
【HCNA|ensp ppp数据抓包 查看接口用户名和密码】配置完后,关闭r1与r3相连接口,一段时间后再打开。
[r3]int serial 4/0/0
[r3-Serial4/0/0]shutdown
[r3-Serial4/0/0]undo
shutdown
dis ip int brief
*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 2
The number of interface that
is DOWN in Protocol is 4
Interface IP Address/Mask Physical
Protocol
GigabitEthernet0/0/0 10.0.1.254/24 up up
GigabitEthernet0/0/1 unassigned down down
GigabitEthernet0/0/2 unassigned down down
NULL0 unassigned up up(s)
Serial4/0/0 10.0.13.1/24 up down
Serial4/0/1 unassigned down down
[r3]dis ip int brief
*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 2
The number of interface that
is DOWN in Protocol is 4
Interface IP Address/Mask Physical
Protocol
GigabitEthernet0/0/0 10.0.23.3/24 up up
GigabitEthernet0/0/1 unassigned down down
GigabitEthernet0/0/2 unassigned down down
NULL0 unassigned up up(s)
Serial4/0/0 10.0.13.3/24 up down
Serial4/0/1 unassigned down down
可以观察已经无法联通正常。
现在在r1上配置pap
[r1]int serial 4/0/0
[r1-Serial4/0/0]ppp pap
local-user r1@huaweiyu password cipher hauwei
配置完成后,查看链路状态
[r1]dis ip int brief
*down: administratively down
^down: standby
Interface IP Address/Mask Physical
Protocol
GigabitEthernet0/0/0 10.0.1.254/24 up up
GigabitEthernet0/0/1 unassigned down down
GigabitEthernet0/0/2 unassigned down down
NULL0 unassigned up up(s)
Serial4/0/0 10.0.13.1/24 up up
Serial4/0/1 unassigned down
down
[r1]ping 10.0.13.3
PING 10.0.13.3: 56 data bytes, press CTRL_C to break
Reply from 10.0.13.3: bytes=56 Sequence=1ttl=255 time=120 msReply from 10.0.13.3: bytes=56 Sequence=2ttl=255 time=30 msReply from 10.0.13.3: bytes=56 Sequence=3ttl=255 time=40 msReply from 10.0.13.3: bytes=56 Sequence=4ttl=255 time=60 msReply from 10.0.13.3: bytes=56 Sequence=5ttl=255 time=40 ms

— 10.0.13.3 ping statistics —
5 packet(s) transmitted5 packet(s) received0.00% packet lossround-trip min/avg/max = 30/58/120 ms

可以观察正常
测试pc1与pc2的连通性
PC>ping 10.0.2.1
Ping 10.0.2.1: 32 data
bytes, Press Ctrl_C to break
Request timeout!
From 10.0.2.1: bytes=32
seq=2 ttl=125 time=47 ms
From 10.0.2.1: bytes=32
seq=3 ttl=125 time=31 ms
From 10.0.2.1: bytes=32
seq=4 ttl=125 time=31 ms
From 10.0.2.1: bytes=32
seq=5 ttl=125 time=31 ms
— 10.0.2.1 ping statistics 5 packet(s) transmitted
4 packet(s) received
20.00% packet loss
联通正常
这样就可以在r1的4/0/0接口进行抓包了
注意:抓包过程中要先断该接口的连接,然后再建立连接 这时就会抓到互相认证的数据包,通过数据包就可以查看密码。
注意:抓包选择authentication request
HCNA|ensp ppp数据抓包 查看接口用户名和密码
文章图片

    推荐阅读