网站首页 > 博客文章 正文
一、tcpreplay命令简介
tcpreplay 主要用于通过tcpdump,wrieshark 抓取的数据,通过此命令回放到指定网络中。从而对特定类故障 ,数据进行分析。
二、测试环境搭建(虚拟机环境)
虚拟机安装centos 7
派网论坛下载panabit安装包,通过安装panabit 标准免费版模拟网络,因为该系统具备协议识别功能所以容易模拟,或者其他厂家具备七层协议识别功能的设备也可以。
三、tcpreplay安装
yum -y install epel-release
yum provides tcpreplay #可以反向查看该命令的软件包
yum -y install tcpreplay-4.3.3-1.el7.x86_64
四、tcpreplay命令常用参数
[root@localhost ~]# tcpreplay -h
-v, --verbose Print decoded packets via tcpdump to STDOUT
以tcpdump 形式输出回放数据信息
-i, --intf1=str Client to server/RX/primary traffic output interface
指定回放数据的发送网口
-l, --loop=num Loop through the capture file X times
指定回放数据的循环次数
-L, --limit=num Limit the number of packets to send
指定回放数据包的数量
-p, --pps=str Replay packets at a given packets/sec
回放速率,以每秒多少个pps回放
-V, --version Print version information
版本信息显示
-h, --less-help Display less usage information and exit
帮助信息
五、实验模拟
将wireshark 抓取的数据上传到linux
回放信息如下:
[root@localhost ~]# tcpreplay -v -p 1 -i ens33 -L 1 1111111.pcap
Warning: 1111111.pcap was captured using a snaplen of 10000 bytes. This may mean you have truncated packets.
reading from file -, link-type EN10MB (Ethernet)
23:31:16.1598283076 IP 192.168.1.165.34318 > 116.128.137.125.54182: UDP, length 25
Actual: 1 packets (67 bytes) sent in 0.000008 seconds
Rated: 8375000.0 Bps, 67.00 Mbps, 125000.00 pps
Flows: 1 flows, 125000.00 fps, 1 flow packets, 0 non-flow
Statistics for network device: ens33
Successful packets: 1
Failed packets: 0
Truncated packets: 0
Retried packets (ENOBUFS): 0
Retried packets (EAGAIN): 0
[root@localhost ~]# tcpreplay -v -p 1 -i ens33 -L 100 1111111.pcap
Warning: 1111111.pcap was captured using a snaplen of 10000 bytes. This may mean you have truncated packets.
reading from file -, link-type EN10MB (Ethernet)
23:31:16.1598283076 IP 192.168.1.165.34318 > 116.128.137.125.54182: UDP, length 25
23:31:16.1598283076 IP 116.128.137.125.54182 > 192.168.1.165.34318: UDP, length 25
23:31:16.1598283076 IP 192.168.1.165.34318 > 116.128.137.125.54182: UDP, length 25
23:31:16.1598283076 IP 116.128.137.125.54182 > 192.168.1.165.34318: UDP, length 25
23:31:16.1598283076 IP 192.168.1.165.34318 > 116.128.137.125.54182: UDP, length 23
23:31:16.1598283076 IP 116.128.137.125.54182 > 192.168.1.165.34318: UDP, length 23
23:31:16.1598283076 IP 116.128.137.125.54182 > 192.168.1.165.34318: UDP, length 6
23:31:16.1598283076 IP 192.168.1.165.34318 > 116.128.137.125.54182: UDP, length 207
23:31:16.1598283076 IP 192.168.1.165.34318 > 116.128.137.125.54182: UDP, length 13
23:31:16.1598283076 IP 116.128.137.125.54182 > 192.168.1.165.34318: UDP, length 150
23:31:16.1598283076 IP 116.128.137.125.54182 > 192.168.1.165.34318: UDP, length 12
23:31:16.1598283076 IP 192.168.1.165.34318 > 116.128.137.125.54182: UDP, length 30
23:31:16.1598283076 IP 116.128.137.125.54182 > 192.168.1.165.34318: UDP, length 12
panabit端查相关数据:
备注: 建议回放的时候wireshark 抓取数据中的来源IP地址和linux虚拟机网卡的ip地址一致,本实验中 pcap的来源ip和linux 虚拟机的IP 均为192.168.1.165
猜你喜欢
- 2024-10-07 元数据与数据治理实战|Zookeeper在大型分布式系统中的应用(3)
- 2024-10-07 HCIE2020__路由交换专家__配置 IPSec VPN
- 2024-10-07 【0基础学爬虫】爬虫基础之抓包工具的使用
- 2024-10-07 Fiddler 窗口布局如何操作详解(fiddler界面)
- 2024-10-07 Zookeeper在大型分布式系统中的应用
- 2024-10-07 Linux下系统 I/O 性能分析的套路(linux ion)
- 2024-10-07 案例|如何定位无线访问互联网故障问题?
- 2024-10-07 「分享」非常全面的CentOS7系统安全检测和加固脚本
- 2024-10-07 Illustrate Asset UPnP Premium 2024.08.07音频设计的 UPnP 服务器软件
- 2024-10-07 IBM MQ---配置Explorer远程连接(ibm mq创建远程队列)
你 发表评论:
欢迎- 07-08Google Cloud Platform 加入支持 Docker 的容器引擎
- 07-08日本KDDI与Google Cloud 签署合作备忘录,共探AI未来
- 07-08美国Infoblox与Google Cloud合作推出云原生网络和安全解决方案
- 07-08GoogleCloud为Spanner数据库引入HDD层,将冷存储成本降低80%
- 07-08谷歌推出Cloud Dataproc,缩短集群启动时间
- 07-08Infovista与Google Cloud携手推进射频网络规划革新
- 07-08比利时Odoo与Google Cloud建立增强合作,扩大全球影响力
- 07-08BT 和 Google Cloud 通过 Global Fabric 加速 AI 网络
- 最近发表
-
- Google Cloud Platform 加入支持 Docker 的容器引擎
- 日本KDDI与Google Cloud 签署合作备忘录,共探AI未来
- 美国Infoblox与Google Cloud合作推出云原生网络和安全解决方案
- GoogleCloud为Spanner数据库引入HDD层,将冷存储成本降低80%
- 谷歌推出Cloud Dataproc,缩短集群启动时间
- Infovista与Google Cloud携手推进射频网络规划革新
- 比利时Odoo与Google Cloud建立增强合作,扩大全球影响力
- BT 和 Google Cloud 通过 Global Fabric 加速 AI 网络
- NCSA和Google Cloud合作开发AI驱动的网络防御系统,加强泰国网络空间的安全性
- SAP将在沙特阿拉伯 Google Cloud 上推出BTP服务
- 标签列表
-
- ifneq (61)
- 字符串长度在线 (61)
- googlecloud (64)
- messagesource (56)
- promise.race (63)
- 2019cad序列号和密钥激活码 (62)
- window.performance (66)
- qt删除文件夹 (72)
- mysqlcaching_sha2_password (64)
- ubuntu升级gcc (58)
- nacos启动失败 (64)
- ssh-add (70)
- jwt漏洞 (58)
- macos14下载 (58)
- yarnnode (62)
- abstractqueuedsynchronizer (64)
- source~/.bashrc没有那个文件或目录 (65)
- springboot整合activiti工作流 (70)
- jmeter插件下载 (61)
- 抓包分析 (60)
- idea创建mavenweb项目 (65)
- vue回到顶部 (57)
- qcombobox样式表 (68)
- tomcatundertow (58)
- pastemac (61)
本文暂时没有评论,来添加一个吧(●'◡'●)