
答案1
以下命令將在管理員命令提示字元下執行。
- 若要更改 IP,命令語法為:
netsh interface ip set address "interface name" "dhcp/static" "IPv4 address" "IPv4 mask" "gateway IPv4 address"
假設我的本機 IP 10.0.0.5,閘道 10.0.0.1,子網路遮罩 255.0.0.0,指令將是::
netsh interface ip set address "Ethernet" static 10.0.0.5 255.0.0.0 10.0.0.1
- 若要更改 DNS,命令語法為:
netsh int ipv4 add dnsserver "interface name" "DNS IPv4 address" "index=integer" "yes/no"
假設我的 DNS 伺服器為 208.67.222.222 和 208.67.220.220,指令為::
netsh int ipv4 add dnsserver "Ethernet" address=208.67.222.222 index=1 netsh int ipv4 add dnsserver "Ethernet" address=208.67.220.220 index=2
答案2
您可以嘗試以下步驟:
- 按一下鍵盤上的 Windows 鍵並按 X。
在類別檢視中點選網路和 Internet
點選網路和共享中心
- 點擊更改適配器設置
- 右鍵單擊本地連接,然後單擊屬性
- 按一下“Internet 協定版本 4 (TCP/IP)”,然後按一下“屬性”
- 將“點”更改為“使用下列 IP 位址”並輸入您的 IP 和 DNS 資訊。
- 點擊“確定”儲存並應用您的設定。