實(shí)戰(zhàn)演練——如何通過(guò)命令修改windows系統(tǒng)的IP和DNS第1" />

国产成人精品无码青草_亚洲国产美女精品久久久久∴_欧美人与鲁交大毛片免费_国产果冻豆传媒麻婆精东

18143453325 在線咨詢 在線咨詢
18143453325 在線咨詢
所在位置: 首頁(yè) > 營(yíng)銷資訊 > 建站知識(shí) > 一鍵快速修改windows系統(tǒng)的IP和DNS

一鍵快速修改windows系統(tǒng)的IP和DNS

時(shí)間:2023-02-19 18:06:01 | 來(lái)源:建站知識(shí)

時(shí)間:2023-02-19 18:06:01 來(lái)源:建站知識(shí)

一鍵快速修改windows系統(tǒng)的IP和DNS:

概述

一鍵快速修改windows系統(tǒng)的IP和DNS采用執(zhí)行xx.bat文件方式,那么xx.bat文件該如何編寫呢?本期文章向各位小伙伴總結(jié)分享。

實(shí)戰(zhàn)演練——如何通過(guò)命令修改windows系統(tǒng)的IP和DNS

第1步:采用管理員權(quán)限打開命令提示符(CMD),如下圖所示(windows10操作系統(tǒng));

第2步:在命令提示符中輸入“netsh”,然后,輸入“interface ip”,如下所示;

C:/Users/007>netsh

netsh>

netsh>interface ip

netsh interface ipv4>

第3步:在“netsh interface ipv4>”視圖中,輸入命令“show interface”查詢系統(tǒng)的可用的網(wǎng)卡信息從而獲取網(wǎng)卡的名稱,如下圖所示;

第4步:在“netsh interface ipv4>”視圖中,輸入命令set address "Ethernet0" dhcp和set dns "Ethernet0" dhcp,配置網(wǎng)卡Ethernet0自動(dòng)獲取IP地址和DNS地址,默認(rèn)情況下,永久保存。如下圖所示;

第5步:查看網(wǎng)卡IP地址和DNS地址的配置效果,在“netsh interface ipv4>”視圖中,輸入命令show address "Ethernet0"和show dns "Ethernet0",如下圖所示;

以上是關(guān)于windows系統(tǒng)自動(dòng)獲取IP和DNS的配置方式,那么如何配置靜態(tài)的IP地址和DNS地址呢?

Windows系統(tǒng)配置靜態(tài)IP地址和DNS地址的方式,如下圖所示;

備注:

Windows10系統(tǒng)提供的示例——IP地址配置方式:

set address name="Wired Ethernet Connection" source=dhcp

set address "Wired Ethernet Connection" static 10.0.0.9 255.0.0.0 10.0.0.1 1

Windows10系統(tǒng)提供的示例——DNS地址配置方式:

set dnsservers name="Wired Ethernet Connection" source=dhcp

set dnsservers "Wired Ethernet Connection" static 10.0.0.1 primary

實(shí)戰(zhàn)演練——如何一鍵修改windows系統(tǒng)的IP和DNS

一鍵修改Windows系統(tǒng)的IP和DNS——DHCP自動(dòng)獲取

把以下兩條命令復(fù)制到文本文檔中,并另外為dhcp.bat。(管理員權(quán)限運(yùn)行dhcp.bat)

Ethernet0是系統(tǒng)網(wǎng)卡名稱,需要通過(guò)命令netsh interface ipv4 show interface提前查詢獲得。

netsh interface ipv4 set address "Ethernet0" dhcp

netsh interface ipv4 set dns "Ethernet0" dhcp

另存為dhcp.bat方式,如下圖所示;

一鍵修改Windows系統(tǒng)的IP和DNS——靜態(tài)配置

把以下兩條命令復(fù)制到文本文檔中,并另外為static.bat。(管理員權(quán)限運(yùn)行static.bat)。其中,IP地址:192.168.1.100、掩碼:255.255.255.0、網(wǎng)關(guān):192.168.1.254、DNS地址:223.5.5.5。

netsh interface ipv4 set address "Ethernet0" static 192.168.1.100 255.255.255.0 192.168.1.254

netsh interface ipv4 set dns "Ethernet0" static 223.5.5.5

總結(jié)

以上是一鍵快速修改windows系統(tǒng)的IP和DNS的總結(jié)分享,不足之處,歡迎各位小伙伴留言多多指正。

關(guān)鍵詞:系統(tǒng),修改

74
73
25
news

版權(quán)所有? 億企邦 1997-2025 保留一切法律許可權(quán)利。

為了最佳展示效果,本站不支持IE9及以下版本的瀏覽器,建議您使用谷歌Chrome瀏覽器。 點(diǎn)擊下載Chrome瀏覽器
關(guān)閉