首页
/
每日頭條
/
科技
/
同網段雙網卡訪問不同地址
同網段雙網卡訪問不同地址
更新时间:2026-01-28 10:24:53

服務器雙網卡,1個訪問内網,1個訪問外網,外網用的電腦本身網卡,内網使用在網上買了個USB網卡,分别插上内外網網線,不能使用,查閱資料,以下方案可行,如有相同問題的條友,可以一試,我在頭條上記錄下來,也是為以後再次設置備查。

如何設置雙網卡:

1、設置内外網IP,内網不設置網關。

同網段雙網卡訪問不同地址(電腦雙網卡設置)1

2、用管理員身份進入CMD

3、route delete 0.0.0.0

4、route print

分别找到外網網卡和内網網卡,記錄下是前面的數字,這個數字是網卡編号。

同網段雙網卡訪問不同地址(電腦雙網卡設置)2

3、route add -p 0.0.0.0 mask 0.0.0.0 10.64.5.1 if 7

增加外網路由,外網網關為10.64.5.1 7是外網網卡号。

4、route add -p 192.168.1.0 mask 255.255.0.0 192.168.1.1 if 47

增加内網路由,

内網網關為192.168.1.1 17是内網網卡号。

通過以上設置,内外網都可以順利訪問。

,
Comments
Welcome to tft每日頭條 comments! Please keep conversations courteous and on-topic. To fosterproductive and respectful conversations, you may see comments from our Community Managers.
Sign up to post
Sort by
Show More Comments
Copyright 2023-2026 - www.tftnews.com All Rights Reserved