跳到正文
DEV Community· Sandeep Shelke·· 3 小時前AI 評分37

網線沒有問題:雙網卡電腦上的子網重疊

The cable was fine: overlapping subnets on a two-NIC machine

AI 導讀

作者隔離 AI 模型集羣時,無法從實驗室電腦連接另一個網絡的主機;AI 找出原因是雙網卡使用了重疊的子網地址。作者為橋接網絡設定另一個地址範圍,並提醒使用 VLAN 時確保網絡隔離,且只有一個節點啟用橋接。

正文

Cover image for The cable was fine: overlapping subnets on a two-NIC machine

Sandeep Shelke

While isolating my AI model cluster on its own network segment, I could not reach a host on another network from my lab machine.

I was suspecting a faulty NIC card, a faulty cable, or a wrong connection on the switch in the lab.

AI came in handy to detect it. I asked it to trace why I was not able to reach that host. The machine had two NIC cards, one on my subnet and the other used as a bridge to another subnet. It said the new IP being assigned was from the same subnet as my own. Two networks with overlapping addresses.

Before: the old /23 range contains the external /24, so the addresses overlap. After: each network has its own range.

So I gave the bridged network its own range.

If you are using a VLAN, ensure that it is isolated and only one of the nodes has the bridge enabled. It could be wired or wireless.

The one rule: a network is reachable only if the address ranges do not collide and a router sits in both.

To check quickly: ip -br addr shows each card with its address and prefix. If one range sits inside the other, you have the same problem.

With private AI this matters more. Model servers should sit on their own segment, with one way in and out. I wrote more on why: https://yantrakar.com/self-replication-network-boundary.html

Have you lost time on overlapping subnets?

Written with help from Claude. The experience is mine. Addresses in the pictures are deliberately obfuscated to avoid leaking internals.

來源:DEV Community · dev.to