自学内容网 自学内容网

【PVE】新增2.5G网卡作为主网卡暨iperf测速流程

【PVE】新增2.5G网卡作为主网卡暨iperf测速流程

新增网卡

新增网卡的首先当然需要关闭PVE母机,把新网卡插上,我用淘宝遥现金搞了个红包,花了26元买了块SSU的2.5G网卡。说实话这个价位连散热片都没有,确实挺丐的。稍后测下速度看看能不能达标。

1720602033714.jpg

1720602033715.jpg

1720602033717.jpg

1720602033716.jpg

插上之后启动PVE,在后台即可看到新的网卡“enp3s0”。当然它默认是关闭的。

1720602123665.png

我们点击上方的编辑,只需把自动启动打开。然后系统会提示点击右上角的“应用配置”。

1720602181658.png

网卡启动之后我们编辑Linux Bridge,将桥接端口改为新的网卡名称。

1720602270528.png

然后保存,应用配置,此时日志不会显示出来了,这是正常的,因为连接PVE的后台的网卡已经变为了新网卡,现在我们把网线拔掉然后换到新网卡即可重新进入PVE后台。至此网卡更换完成。

测速

然后我们来看看这块网卡的速度吧~

在内网中的两台不同PVE母机上启动两个Centos虚拟机,安装iperf。

sudo yum install iperf3 -y

配置服务端防火墙。

sudo firewall-cmd --add-port=5201/tcp --permanent
sudo firewall-cmd --add-port=5201/udp --permanent
sudo firewall-cmd --reload

在其中一台Centos启动服务端。

iperf3 -s

另一台Centos作为客户端连接服务器。

iperf3 -c <服务端的IP地址>

服务端

[root@localhost ~]# sudo firewall-cmd --add-port=5201/tcp --permanent
success
[root@localhost ~]# sudo firewall-cmd --add-port=5201/udp --permanent
success
[root@localhost ~]# sudo firewall-cmd --reload
success
[root@localhost ~]# iperf3 -s
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------
Accepted connection from 10.0.0.242, port 39284
[  5] local 10.0.0.241 port 5201 connected to 10.0.0.242 port 39286
[ ID] Interval           Transfer     Bandwidth
[  5]   0.00-1.00   sec   269 MBytes  2.26 Gbits/sec                  
[  5]   1.00-2.00   sec   281 MBytes  2.35 Gbits/sec                  
[  5]   2.00-3.00   sec   281 MBytes  2.35 Gbits/sec                  
[  5]   3.00-4.00   sec   281 MBytes  2.35 Gbits/sec                  
[  5]   4.00-5.00   sec   281 MBytes  2.35 Gbits/sec                  
[  5]   5.00-6.00   sec   281 MBytes  2.35 Gbits/sec                  
[  5]   6.00-7.00   sec   281 MBytes  2.35 Gbits/sec                  
[  5]   7.00-8.00   sec   281 MBytes  2.35 Gbits/sec                  
[  5]   8.00-9.00   sec   281 MBytes  2.35 Gbits/sec                  
[  5]   9.00-10.00  sec   281 MBytes  2.35 Gbits/sec                  
[  5]  10.00-10.05  sec  13.2 MBytes  2.35 Gbits/sec                  
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth
[  5]   0.00-10.05  sec  0.00 Bytes  0.00 bits/sec                  sender
[  5]   0.00-10.05  sec  2.74 GBytes  2.34 Gbits/sec                  receiver
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------

可见这网卡速度还是可以的,能跑到2.35G,一般便宜的2.5G网卡也就这水平了。


原文地址:https://blog.csdn.net/qq_35516428/article/details/140330367

免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!