From: 011netservice@gmail.com Date: 2025-06-09 Subject: 固定ip.txt 歡迎來信交流, 訂購軟體需求. #### windows pro 設定為固定 ip 的指令 ? 操作的方式比較直覺 windows pro 設定為固定 ip 的指令 1. 先查出網路介面名稱, 後面會用到. netsh interface show interface 2. 再指定 (IP, mask, gateway) netsh interface ip set address name="乙太網路" static 192.168.0.28 255.255.255.0 192.168.0.254 3. 最後設定 dns x 2 建議組合 全 google: netsh interface ip set dns name="乙太網路" static 8.8.8.8 netsh interface ip add dns name="乙太網路" 8.8.4.4 index=2 使用 Cloudflare 為主 DNS,TWNIC 的 Quad 101 為備用 DNS,兼顧速度與本地連線品質: netsh interface ip set dns name="乙太網路" static 1.1.1.1 netsh interface ip add dns name="乙太網路" 101.101.101.101 index=2 國際公共 DNS Google** | `8.8.8.8` | `8.8.4.4` | Cloudflare** | `1.1.1.1` | `1.0.0.1` | OpenDNS** | `208.67.222.222` | `208.67.220.220` | Quad9** | `9.9.9.9` | `149.112.112.112` | NextDNS** | `45.90.28.190` | `45.90.30.190` | 台灣本地 DNS 中華電信 Hinet** | `168.95.1.1` | `168.95.192.1` | Quad 101(TWNIC)** | `101.101.101.101` | `101.102.103.104` | 遠傳 SeedNet** | `139.175.1.1` | *(無公開備用)* | So-net** | `61.64.127.1` | `61.64.127.2` | 台灣固網 TFN** | `211.78.215.137` | `211.78.215.200` | #### 以下確認後移到上方. netsh interface ip set address name="乙太網路" static 192.168.1.100 255.255.255.0 192.168.1.1 netsh interface ip set dns name="乙太網路" static 8.8.8.8 netsh interface ip add dns name="乙太網路" 8.8.4.4 index=2 netsh interface show interface 「乙太網路」介面: 連線特定 DNS 尾碼 . . . . . . . . : 描述 . . . . . . . . . . . . . . .: Realtek Gaming 2.5GbE Family Controller 實體位址 . . . . . . . . . . . . .: 60-CF-84-A7-0D-97 DHCP 已啟用 . . . . . . . . . . . : 否 自動設定啟用 . . . . . . . . . . .: 是 連結-本機 IPv6 位址 . . . . . . . : fe80::f4a6:ce54:4759:84db%4(偏好選項) IPv4 位址 . . . . . . . . . . . . : 192.168.0.17(偏好選項) 子網路遮罩 . . . . . . . . . . . .: 255.255.255.0 預設閘道 . . . . . . . . . . . . .: 192.168.0.254 DHCPv6 IAID . . . . . . . . . . . : 56676228 DHCPv6 用戶端 DUID. . . . . . . . : 00-01-00-01-2F-CE-DF-6A-60-CF-84-A7-0D-97 DNS 伺服器 . . . . . . . . . . . .: 208.91.112.53 208.91.112.52 NetBIOS over Tcpip . . . . . . . .: 啟用 netsh interface ip set address name="乙太網路" static 192.168.0.17 255.255.255.0 192.168.0.254 netsh interface ip set dns name="乙太網路" static 208.91.112.53 netsh interface ip add dns name="乙太網路" 208.91.112.52 index=2 netsh interface show interface #### 依照原來自動 DHCP 的設定, 改為相同內容的 手動設定了 IP, mask, gate, 還有 dns1, dns2 以後, 卻無法上網瀏覽, 可能原因是什麼 ? ### 🔍 1. **DNS 設定錯誤或無效** - 雖然 IP 設定正確,但如果 DNS 無法解析網址,就會導致無法瀏覽網站。 - ✅ 解法:嘗試改用穩定的 DNS,例如: - `1.1.1.1`(Cloudflare) - `8.8.8.8`(Google) --- ### 🔍 2. **預設閘道(Default Gateway)設定錯誤** - 預設閘道是通往外部網路的路徑,如果設定錯誤,會導致無法連上網際網路。 - ✅ 解法:確認閘道 IP 是否與你的 IP 位於同一子網(例如:IP 是 `192.168.0.17`,閘道應該是 `192.168.0.x`) --- ### 🔍 3. **IP 位址衝突** - 如果你手動設定的 IP 已經被其他裝置使用,會導致網路異常。 - ✅ 解法:嘗試更換一個未被使用的 IP,例如 `192.168.0.88` --- ### 🔍 4. **子網路遮罩設定錯誤** - 子網路遮罩錯誤會導致無法正確判斷哪些裝置在同一網段。 - ✅ 解法:大多數家庭網路使用 `255.255.255.0` --- ### 🔍 5. **網路介面名稱錯誤或未啟用** - 如果你設定的介面名稱錯誤,或該介面未啟用,設定將無效。 - ✅ 解法:使用 `netsh interface show interface` 確認介面狀態 --- ### 🔍 6. **防火牆或安全軟體阻擋** - 某些防火牆或安全軟體可能會阻擋手動設定的網路連線。 - ✅ 解法:暫時停用防火牆測試是否為此原因 --- ### 🔍 7. **路由器未允許靜態 IP 或有 MAC 綁定** - 有些路由器會限制只能使用 DHCP 分配的 IP,或綁定 MAC 位址。 - ✅ 解法:登入路由器管理介面檢查 DHCP 設定與 MAC 綁定 --- ### ✅ 建議測試步驟: 1. 開啟命令提示字元(CMD),輸入: ```cmd ping 8.8.8.8 ``` - 如果能 ping 通,表示網路通,但 DNS 有問題。 2. 再輸入: ```cmd nslookup www.google.com ``` - 如果這個失敗,表示 DNS 設定有誤。 PS> nslookup www.google.com 伺服器: fortinet-public-dns-53.fortinet.com Address: 208.91.112.53 未經授權的回答: 名稱: www.google.com Addresses: 2404:6800:4012:9::2004 142.250.204.36