当前位置:网站首页>I.MX6UL核心模块使用连载-以太网测试 (七)
I.MX6UL核心模块使用连载-以太网测试 (七)
2022-07-26 01:58:00 【szembed】
以下内容已经在Iot-6ULX/EVB-6ULX平台上验证通过,Iot-6ULX/EVB-6ULX介绍如下:

开发板上搭载了2路10/100Mbps以太网接口CN7和CN13。
- 板载IoT-6ULx核心板模块时,只有接口CN7有效,在软件中对应的设备号是eth0。
- 板载CoM-T6UL核心模块时,接口CN7和CN13都有效,在软件中CN13对应的设备号为eth0,CN7对应的设备号则为eth1。
以太网络的测试方法是相同的,以下网络测试以板载IoT-6ULx的网络测试为例进行说明。当拿到板载CoM-T6UL的开发板测试时,测试方法相同。
注意:网络接口CN13仅在板载CoM-T6UL核心模块时有效。
6.1 网络连通性测试
使用ifconfig指令来显示或者配置网络。
[email protected] ~# ifconfig //查看网络信息

查看网络信息
从终端信息中可以看到,板载IoT-6ULx核心板模块时,软件上配置了1路网络eth0。
在配套的软件中,默认开启dhcp守护进程,连接网线后会自动获取IP。在CN7接口连接网线:

网络状态信息
从终端信息中可以看到, eth0已经连接上。输入指令,查看网络是否已经获取IP。
[email protected] ~# ifconfig //查看网络信息

网络自动获取IP
从终端信息中可以看到,eth0已经能自动获取IP了。接下来是通过ping指令测试网络的连通性。可以通过ping与开发板连接的主机的IP,本次测试中,我们的主机IP为192.168.0.11。用户在测试过程中将指令中的IP更换成自己的主机IP即可。
执行如下指令,指令中“-I”代表指定网口,不加“-I”则使用默认网卡(默认网卡指的是有网络接入的一端,如果两个网口都有网络接入,则使用 eth0 作为默认网卡)。按“Ctrl+c”终止ping指令。
[email protected] ~# ping 192.168.0.11 -I eth0 //用eth0 ping 主机192.168.0.11

eth1连通性测试
ping测试结束以后,查看终端信息,没有丢包,说明网络连接性良好。
6.2 TCP/UDP带宽测试
接下来进行带宽测试,带宽测试要使用iperf3工具。iperf是一个网络性能测试工具。iperf可以测试最大TCP和UDP带宽性能,具有多种参数和UDP特性,可以根据需要调整,可以报告带宽、延迟抖动和数据包丢失。
首先,要在主机端下载iperf3工具。从官网下载网址iPerf - Download iPerf3 and original iPerf pre-compiled binaries中下载跟电脑系统配套的版本。如果电脑里面已经有iperf3工具,则可直接使用。
解压缩下载的文件,进入到iperf3.exe所在目录下,按住Shift键,然后单击鼠标右键,选择“在此处打开Powershell窗口”选项,打开命令行窗口。如下图所示:

PC端打开Powershell

Powershell窗口界面
在主机端Powershell窗口的执行以下指令,打开iperf3工具:
PS E:\iperf-3.1.3-win64> .\iperf3 -s

打开iperf3工具
此时,主机端作为服务器,开发板作为客户端,可以进行网络带宽测试。
开始iperf3测试前,为免受干扰,先将无关的网络设备关闭,只保留要测试的设备。现在我们用eth0测试带宽,只连接了CN7,可以不用进行此操作。如果系统中已经加载了其他的网络,可以按照以下指令操作关闭网络:
[email protected] ~# ifconfig eth0 down //关闭eth0,down表示关闭
[email protected] ~# ifconfig eth1 down //关闭eth1,down表示关闭
[email protected] ~# ifconfig wlan0 down //关闭wifi信号wlan0
关闭无关网络后,执行以下指令,测试TCP带宽,本次测试主机IP为192.168.0.11:
[email protected] ~# iperf3 -c 192.168.0.11 -t 10 -4 //测试TCP带宽,时长10s,IPv4标准
测试过程中,超级终端和Powershell窗口都会打印相关信息,如下图所示:

测试TCP带宽终端显示

测试TCP带宽Powershell显示
TCP默认以最大带宽测试,测试中连接到开发板上的网络为百兆网。
执行以下指令,测试UDP带宽,本次测试主机IP为192.168.0.11:
[email protected] ~# iperf3 -c 192.168.0.11 -u -t 10 -4 //测试UDP带宽,时长10s,IPv4标准
测试过程中,超级终端和Powershell窗口都会打印相关信息,如下图所示:

测试UDP带宽终端显示

测试UDP带宽Powershell显示
UDP默认带宽1Mbit/sec,测试值越接近理论值表示测试结果良好。
边栏推荐
- SQL手工盲注、报错注入
- SQL injection tutorial: learn through examples
- Dataframe modifies the value of a row or column position
- Composition API的优势
- Add an interceptor to resttemplate to record the request response, and you also need to solve the problem that the flow is read only once
- Navica tool imports remote MySQL into local MySQL database
- vite 本地运行首次进入页面加载慢问题
- 【Verilog数字系统设计(夏宇闻)3-----Verilog语法的基本概念1】
- Create a future and enjoy extraordinary | gbase Nantah General Motors unveiled opengauss Developer Day 2022
- AUTOCAD——计算面积的方法
猜你喜欢

SQL手工盲注、报错注入

6 + 1 skills of Software Test Engineer
![[leetcode] 32. Longest valid bracket](/img/5e/45bb0b1ca3d9e429c6c5cf5c4c93ae.png)
[leetcode] 32. Longest valid bracket

Ti AM335X工控模块矩阵键盘电路的设计与驱动移植

excel中怎么显示数字/英文时间

pdf. JS introduction

MySQL transaction isolation level

How to use the pagoda panel to deploy the full stack project of node to the server

怎么使用宝塔面板把node全栈项目部署到服务器上

Qt程序美化之样式表的使用方法,Qt使用图片作为背景与控件透明化,Qt自定义按钮样式
随机推荐
Protect syslog servers and devices
DialogRPT-Dialog Ranking Pretrained Transformers
Dest0g3 520 orientation (under update)
Implementation of C iterator
【2021】【论文笔记】红外及THz下的细胞膜生物效应——效应是现象,作用是机理——THz对医学的好处
Study notes: original code, inverse code, complement code
There is no setter method in grpc list under flutter. How to use related attributes
Worthington产气荚膜梭菌神经氨酸酶的特征及测定
2022 love analysis ― bank digitalization practice report
阿里云Redis开发规范
Video game quiz? I think it's useless. It's better to do these well!
餐饮连锁门店重塑增长背后的数字化转型
Dqn pytoch example
Arm assembly foundation of SOC
Detailed explanation of redis6.x configuration parameters
D - Dire Wolf (interval DP)
After reading this article, you should thoroughly understand how to do interface testing
【Verilog数字系统设计(夏宇闻)4-----Verilog语法的基本概念2】
软件加群验证
C# 迭代器的实现