本篇主要是查询了开发板网口的功能,分别对网口的功能参数进行修改和验证,并且通过虚拟机连接开发板以及在虚拟机上传送文件到开发板,测评结果为完全正常。
- 验证开发板的网口功能,操作如下:
通过一个百兆的交换机连接了电脑和开发板,查看开发板的IP地址。
root@Beyond:~# ifconfig
eth0: flags=-28605<UP,BROADCAST,RUNNING,MULTICAST,DYNAMIC> mtu 1500 metric 1
inet 169.254.102.210 netmask 255.255.0.0 broadcast 169.254.255.255
ether 22:05:74:ad:bf:17 txqueuelen 1000 (Ethernet)
RX packets 109 bytes 13910 (13.5 KiB)
RX errors 0 dropped 10 overruns 0 frame 0
TX packets 103 bytes 18810 (18.3 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 152
eth1: flags=-28605<UP,BROADCAST,RUNNING,MULTICAST,DYNAMIC> mtu 1500 metric 1
inet 169.254.121.181 netmask 255.255.0.0 broadcast 169.254.255.255
ether 66:d9:68:8a:bc:61 txqueuelen 1000 (Ethernet)
RX packets 193 bytes 26930 (26.2 KiB)
RX errors 0 dropped 10 overruns 0 frame 0
TX packets 18 bytes 6066 (5.9 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 155
截图如下:
查看电脑的IP地址,如下:
由于开发板的IP地址和电脑IP地址不在一个网关,所以更改开发板的IP地址与电脑IP地址为同一个网关。
root@Beyond:~# ifconfig eth0 192.168.8.22
root@Beyond:~# ifconfig eth1 192.168.8.33
root@Beyond:~# ifconfig
eth0: flags=-28605<UP,BROADCAST,RUNNING,MULTICAST,DYNAMIC> mtu 1500 metric 1
inet 192.168.8.22 netmask 255.255.255.0 broadcast 192.168.8.255
ether 22:05:74:ad:bf:17 txqueuelen 1000 (Ethernet)
RX packets 874 bytes 138587 (135.3 KiB)
RX errors 0 dropped 35 overruns 0 frame 0
TX packets 426 bytes 132872 (129.7 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 152
eth1: flags=-28605<UP,BROADCAST,RUNNING,MULTICAST,DYNAMIC> mtu 1500 metric 1
inet 192.168.8.33 netmask 255.255.255.0 broadcast 192.168.8.255
ether 66:d9:68:8a:bc:61 txqueuelen 1000 (Ethernet)
RX packets 1116 bytes 198248 (193.6 KiB)
RX errors 0 dropped 35 overruns 0 frame 0
TX packets 183 bytes 74119 (72.3 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 155
这时用电脑分别连接开发板的两个网口试一下,如下图
由于开发板设计为两个千兆网口,所以用笔记本电脑的网口挨个直接连接开发板的网口,确认是否为千兆网口。
[ 1309.349394] ravb 11c20000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
[ 1312.421030] ravb 11c20000.ethernet eth0: Link is Down
[ 1314.629398] ravb 11c30000.ethernet eth1: Link is Up - 1Gbps/Full - flow control off
[ 1317.701035] ravb 11c30000.ethernet eth1: Link is Down
再用百兆交换机转接笔记本和开发板。
[ 1330.853271] ravb 11c20000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
[ 1333.061406] ravb 11c30000.ethernet eth1: Link is Up - 100Mbps/Full - flow control off
截图如下,说明开发板的网口工作完全正常。
- 在虚拟机上利用SSH远程连接开发板。下图中可以看到,在虚拟机上通过网络已经连接到了开发板并且读取了根目录下的文件
- 在虚拟机上利用SSH传输文件到开发板。
虚拟机上的指令主要是新建文件(Test_Beyond.test),并且在文件中输入Test_Beyond并且查看,然后将此文件传到开发板的根目录下
开发板中的指令为分别查看传送文件之前和之后根目录下的文件,当文件传输成功后,查看文件内容,如下图:
测试环境如下图: