乙太網路纜線連結協商

乙太網路纜線連結協商

我剛剛購買了一台帶有 4 個 eth 連接埠的 SoC 計算機,我計劃將其轉換為具有 Linux 的路由器。我將一條 CAT5 電纜連接到其中一個 eth 和我的筆記型電腦,但我在任何一側都沒有看到連結。我的錯誤記憶(我在這裡說的是大腦)似乎記得NB擅長協商傳輸包括是否使用直連電纜或交叉電纜。這接近現實嗎?我可以嗎力量NB的eth連接埠用它作為交叉?或者我應該買一條交叉電纜?

答案1

大概任何過去十年製造的設備應該支援 Auto MDI-X。如果您沒有鏈接,我會首先懷疑電纜(也許嘗試連接到交換器以查看那裡是否有連接)。

無論如何,您可以使用 強制 MDI-X ethtool。來自線上說明頁

      mdix auto|on|off
              Selects MDI-X mode for port. May be used to override the
              automatic detection feature of most adapters. An argument
              of auto means automatic detection of MDI status, on forces
              MDI-X (crossover) mode, while off means MDI (straight
              through) mode.  The driver should guarantee that this
              command takes effect immediately, and if necessary may
              reset the link to cause the change to take effect.

答案2

回答自己,因為我剛剛發現問題:這只是運行的問題ip link <dev> up。如果忘記這一點,我會覺得很愚蠢,但我真的不知道在該級別上有控制權,並且如果您沒有配置接口,它就不會嘗試建立連結。

相關內容