歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> 關於Linux >> CentOS網卡狀態查看及設置

CentOS網卡狀態查看及設置

日期:2017/3/1 16:15:38   编辑:關於Linux
CentOS網卡狀態查看及設置 問題 偶然發現實驗室有一台作存儲的服務器局域網內的連接速度只有100M,但是實驗室用的是千兆交換機服務器也是千兆網卡並且其它同類型同用途的服務器局域網速度都達到了千兆, 因此一個問題就出來了,怎樣查看服務器的網卡設備,當前連接速度,速度怎麼調節?相關文檔網卡已經有許多,我也就不哆嗦了,這裡列幾篇供參考: 解決過程 服務器網卡信息如下,從這裡我們看到網卡是支持千兆的,但實際的連接速度只有百兆,作為存儲服務器,這損失大了去了。 [plain] [root@store3 ~]# ethtool eth0 Settings for eth0: Supported ports: [ TP ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Supports auto-negotiation: Yes Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Advertised pause frame use: No Advertised auto-negotiation: Yes Speed: 100Mb/s Duplex: Full Port: Twisted Pair PHYAD: 1 Transceiver: internal Auto-negotiation: on MDI-X: Unknown Supports Wake-on: g Wake-on: g Link detected: yes 這裡我主要使用ethtool進行設置,可是設置完成後速度並沒有變化 [plain] [root@store3 ~]# ethtool -s eth0 speed 1000 [root@store3 ~]# ethtool eth0 Settings for eth0: Supported ports: [ TP ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Supports auto-negotiation: Yes Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Advertised pause frame use: No Advertised auto-negotiation: Yes Speed: 100Mb/s Duplex: Full Port: Twisted Pair PHYAD: 1 Transceiver: internal Auto-negotiation: on MDI-X: Unknown Supports Wake-on: g Wake-on: g Link detected: yes 使用命令ethtool -s eth0 duplex full autoneg off speed 1000報參數錯誤,多次折騰後發現使用ethtool -s eth0 autoeng off後可以設置使用命令 ethtool -s eth0 speed N設置網速為10或100,但改為1000時報參數錯誤。經過多次嘗試,最後的最後竟然發現是網線的問題!!!換完網速就上去了,無語。 雖然最後問題是出在了網線上,但至少還是學會了怎麼查看網卡狀態及簡單的設置,還是值得記錄一下的。
Copyright © Linux教程網 All Rights Reserved