千兆流量需要什么样的Linux配置

千兆流量需要什么样的Linux配置,第1张

使用ethtool命令

ethtool是Linux下用于查询设置网卡参数的命令。

举例:

[root@hvrhub ~]# ethtool eth0

Settings for eth0:

Supported ports: [ TP MII ]

Supported link modes: 10baseT/Half 10baseT/Full

100baseT/Half 100baseT/Full

Supports auto-negotiation: Yes

Advertised link modes: 10baseT/Half 10baseT/Full

100baseT/Half 100baseT/Full

Advertised auto-negotiation: Yes

Speed: 100Mb/s ------------------------------------>网卡速度

Duplex: Full

Port: MII

PHYAD: 0

Transceiver: internal

Auto-negotiation: on

Supports Wake-on: pumbg

Wake-on: g

Current message level: 0x00000033 (51)

Link detected: yes

详细参数参考:(//后面是注释,是原文的译文)

ethtool ethX /

ethtool –h //显示ethtool的命令帮助(help)

ethtool –i ethX //查询ethX网口的相关信息

ethtool –d ethX //查询ethX网口注册性信息

ethtool –r ethX //重置ethX网口到自适应模式

ethtool –S ethX //查询ethX网口收发包统计

ethtool –s ethX [speed 10|100|1000]\ //设置网口速率10/100/1000M

[duplex half|full]\ //设置网口半/全双工

[autoneg on|off]\ //设置网口是否自协商

[port tp|aui|bnc|mii]\ //设置网口类型

1.下载安装包:ethtool-3.15.tar.gz,将其放入自己的路径下,解压:tar zxvf ethtool-3.15.tar.gz

2.编译安装:

cd ethtool-3.15

sudo ./configure

sudo make

sudo make install

3.ethtool -s ethX [speed 10|100|1000]\ //设置网口速率10/100/1000M

[duplex half|full]\  //设置网口半/全双工

[autoneg on|off]\    //设置网口是否自协商

例如:ethtool -s eth0 speed 100 duplex full autoneg off


欢迎分享,转载请注明来源:内存溢出

原文地址: https://www.outofmemory.cn/yw/8489208.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-04-17
下一篇 2023-04-17

发表评论

登录后才能评论

评论列表(0条)

保存