Red Hat Training
A Red Hat training course is available for RHEL 8
34.2. 使用 nmcli 工具配置 802.3 链路设置
要配置以太网连接的 802.3 链接设置,请修改以下配置参数:
-
802-3-ethernet.auto-negotiate
-
802-3-ethernet.speed
-
802-3-ethernet.duplex
流程
显示连接的当前设置:
# nmcli connection show Example-connection ... 802-3-ethernet.speed: 0 802-3-ethernet.duplex: -- 802-3-ethernet.auto-negotiate: no ...
如果需要在有问题的时候重置参数,您可以使用这些值。
设置速度和双工链路设置:
# nmcli connection modify Example-connection 802-3-ethernet.auto-negotiate no 802-3-ethernet.speed 10000 802-3-ethernet.duplex full
这个命令会禁用自动协商,并将连接的速度设为
10000
Mbit 全双工。重新激活连接:
# nmcli connection up Example-connection
验证
使用
ethtool
工具验证以太网接口enp1s0
的值:# ethtool enp1s0 Settings for enp1s0: ... Advertised auto-negotiation: No ... Speed: 10000Mb/s Duplex: Full Auto-negotiation: off ... Link detected: yes
其他资源
- 网络接口速度为 100Mbps,应为 1Gbps
-
nm-settings(5)
手册页