IP 和 TCP 抓包分析实验

简介: 在这个实验中,网络拓扑包括两台路由器R1和R2,它们的g0/0接口分别配置IP地址1.1.1.1/24和1.1.1.2/24。实验步骤包括:在链路上开启抓包,R1向R2发送ping请求,并使用Wireshark分析抓取的ping包。接着在R2上启用FTP服务,创建用户abc,密码123456789A。R1成功连接到R2的FTP服务器,Wireshark捕获了登录时的用户名和密码信息。

实验拓扑
image.png
实验需求
1、配置IP地址,R1的g0/0口是1.1.1.1/24 ,R2的g0/0口是1.1.1.2/24

2、在该链路上开启抓包

3、在R1上ping R2

4、开启wireshark,查看抓取的ping包的内容

5、在R2上开启ftp服务

6、在R1上访问R2的FTP

7、刷新wireshark,查看抓取的FTP的登录名和密码
实验解法
为r1配置IP

<H3C>sys
System View: return to User View with Ctrl+Z.
[H3C]sysname r1
[r1]int g0/0
[r1-GigabitEthernet0/0]ip ad
[r1-GigabitEthernet0/0]ip address  1.1.1.1 24
[r1-GigabitEthernet0/0]qu
[r1]di ip in b
*down: administratively down
(s): spoofing  (l): loopback
Interface           Physical Protocol IP address/Mask    VPN instance Description
GE0/0               up       up       1.1.1.1/24         --           --

为r2配置IP

<H3C>sys
System View: return to User View with Ctrl+Z.
[H3C]sysname r2
[r2]int g0/0
[r2-GigabitEthernet0/0]ip ad
[r2-GigabitEthernet0/0]ip address  1.1.1.2 24
[r2-GigabitEthernet0/0]qu
[r2]di ip in b
*down: administratively down
(s): spoofing  (l): loopback
Interface           Physical Protocol IP address/Mask    VPN instance Description
GE0/0               up       up       1.1.1.2/24         --           --
[r2]ping 1.1.1.1
Ping 1.1.1.1 (1.1.1.1): 56 data bytes, press CTRL+C to break
56 bytes from 1.1.1.1: icmp_seq=0 ttl=255 time=1.091 ms
56 bytes from 1.1.1.1: icmp_seq=1 ttl=255 time=0.751 ms
56 bytes from 1.1.1.1: icmp_seq=2 ttl=255 time=0.755 ms
56 bytes from 1.1.1.1: icmp_seq=3 ttl=255 time=0.793 ms
56 bytes from 1.1.1.1: icmp_seq=4 ttl=255 time=0.770 ms

开启抓包

image.png

启动Wireshark

image.png

随后用R1ping R2

[r1]ping  -c 1000 1.1.1.2   //-c 指定ping 次数
Ping 1.1.1.2 (1.1.1.2): 56 data bytes, press CTRL+C to break
56 bytes from 1.1.1.2: icmp_seq=0 ttl=255 time=1.203 ms
56 bytes from 1.1.1.2: icmp_seq=1 ttl=255 time=0.591 ms
56 bytes from 1.1.1.2: icmp_seq=2 ttl=255 time=1.021 ms
56 bytes from 1.1.1.2: icmp_seq=3 ttl=255 time=0.765 ms
56 bytes from 1.1.1.2: icmp_seq=4 ttl=255 time=0.726 ms
56 bytes from 1.1.1.2: icmp_seq=5 ttl=255 time=1.223 ms
56 bytes from 1.1.1.2: icmp_seq=6 ttl=255 time=0.908 ms
56 bytes from 1.1.1.2: icmp_seq=7 ttl=255 time=0.859 ms

然后可以在Wireshark中看到抓到的数据包

image.png

双击某个ping包,查看数据包详细内容、展开internet protocol ,可以查看到详细信息

image.png

在R2上开启FTP 服务,创建用户abc,密码123456789A

[r2]ftp server enable
[r2]loc
[r2]local-us
[r2]local-user abc cl
[r2]local-user abc class man
[r2]local-user abc class manage
New local user added.
[r2-luser-manage-abc]password simple 123456789A
[r2-luser-manage-abc]authorization-attribute user-role level-15
[r2-luser-manage-abc]service-type ftp

使用R1登录FTP服务器

<r1>ftp 1.1.1.2
Press CTRL+C to abort.
Connected to 1.1.1.2 (1.1.1.2).
220 FTP service ready.
User (1.1.1.2:(none)): abc
331 Password required for abc.
Password:
230 User logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp>

回到Wireshark 查看已经抓取到了用户名和密码

image.png

目录
相关文章
|
1天前
|
网络协议 数据安全/隐私保护 网络架构
IP和TCP的抓包
IP和TCP的抓包
|
10月前
|
网络协议
TCP协议补充实验(二)
TCP协议补充实验
46 0
|
6月前
|
存储 网络协议 Linux
|
10月前
|
监控 网络协议
TCP协议补充实验(一)
TCP协议补充实验
55 0
|
12月前
|
网络协议 Unix Java
计网 - TCP 实战:如何进行 TCP 抓包调试?
计网 - TCP 实战:如何进行 TCP 抓包调试?
138 0
|
编解码 网络协议 网络架构
计算机网络基础 和 tcp 三次握手四次挥手,tcpdump抓包分析 协议过滤 分析,连接状态,标志位详解
wireshark 软件过滤及转码使用 ,TCP tcpdump 连接状态,标志位详解
241 1
|
网络协议 测试技术
测试TCP/IP配置
安装网络硬件和网络协议之后,我们一般要进行TCP/IP协议的测试工作,那么怎样测试才算是比较全面的测试呢?我们认为,全面的测试应包括局域网和互联网两个方面,因此应从局域网和互联网两个方面测试,以下是我们在实际工作中利用命令行测试TCP/IP配置的步骤:   1、 单击“开始”/“运行”,输入CMD按回车,打开命令提示符窗口。
1143 0
http://www.vxiaotou.com