使用批處理命令設(shè)置windows系統(tǒng)的ip地址和dns附圖
更新時(shí)間:2014年06月06日 11:00:16 作者:
這篇文章主要介紹了如何使用批處理命令設(shè)置windows系統(tǒng)的ip地址和dns,需要的朋友可以參考下
找到對(duì)應(yīng)的網(wǎng)卡名稱(chēng)
使用命令:ipconfig
ipconfig/all
Windows IP Configuration
Host Name . . . . . . . . . . . . : D501-4-3
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Unknown
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
Ethernet adapter 本地連接:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Marvell Yukon 88E8057 PCI-E Gigabit
Ethernet Controller
Physical Address. . . . . . . . . : 44-37-E6-1D-5B-F1
Dhcp Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 192.168.1.111
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.1
DNS Servers . . . . . . . . . . . : 8.8.8.8
我們現(xiàn)在需要設(shè)置的網(wǎng)卡名稱(chēng)為"本地連接",ip地址為192.168.1.111,子網(wǎng)掩碼為255.255.255.0,dns地址為8.8.8.8
將ip和dns設(shè)置為自動(dòng)獲取
使用命令:
netsh interface ip set address "本地連接" dhcp
netsh interface ip set dns "本地連接" dhcp
netsh interface ip set address "本地連接" dhcp
確定。
netsh interface ip set dns "本地連接" dhcp
確定。
相當(dāng)于操作:
將ip和dns設(shè)置為固定的值
使用命令:
netsh interface ip set address "本地連接" static [ip地址] [子網(wǎng)掩碼] [網(wǎng)關(guān)] [網(wǎng)關(guān)跳遠(yuǎn)點(diǎn)數(shù):一般填1]
netsh interface ip set dns "本地連接" static [dns地址]
netsh interface ip set address "本地連接" static 192.168.1.111 255.255.255.0 192
.168.1.1 1
確定。
netsh interface ip set dns "本地連接" static 8.8.8.8
確定。
相當(dāng)于操作:
使用命令:ipconfig
復(fù)制代碼 代碼如下:
ipconfig/all
Windows IP Configuration
Host Name . . . . . . . . . . . . : D501-4-3
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Unknown
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
Ethernet adapter 本地連接:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Marvell Yukon 88E8057 PCI-E Gigabit
Ethernet Controller
Physical Address. . . . . . . . . : 44-37-E6-1D-5B-F1
Dhcp Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 192.168.1.111
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.1
DNS Servers . . . . . . . . . . . : 8.8.8.8
我們現(xiàn)在需要設(shè)置的網(wǎng)卡名稱(chēng)為"本地連接",ip地址為192.168.1.111,子網(wǎng)掩碼為255.255.255.0,dns地址為8.8.8.8
將ip和dns設(shè)置為自動(dòng)獲取
使用命令:
netsh interface ip set address "本地連接" dhcp
netsh interface ip set dns "本地連接" dhcp
復(fù)制代碼 代碼如下:
netsh interface ip set address "本地連接" dhcp
確定。
netsh interface ip set dns "本地連接" dhcp
確定。
相當(dāng)于操作:
將ip和dns設(shè)置為固定的值
使用命令:
netsh interface ip set address "本地連接" static [ip地址] [子網(wǎng)掩碼] [網(wǎng)關(guān)] [網(wǎng)關(guān)跳遠(yuǎn)點(diǎn)數(shù):一般填1]
netsh interface ip set dns "本地連接" static [dns地址]
復(fù)制代碼 代碼如下:
netsh interface ip set address "本地連接" static 192.168.1.111 255.255.255.0 192
.168.1.1 1
確定。
netsh interface ip set dns "本地連接" static 8.8.8.8
確定。
相當(dāng)于操作:
相關(guān)文章
Windows2003下批量添加和導(dǎo)出所有ip BAT腳本
這篇文章主要介紹了Windows2003下批量添加和導(dǎo)出所有ip BAT腳本,本文直接給出代碼實(shí)例,需要的朋友可以參考下2015-07-07
用批處理記錄服務(wù)器遠(yuǎn)程終端3389登陸情況
利用自制的BAT格式腳本與LOG日志文件來(lái)記錄每次用戶(hù)登錄服務(wù)器的情況,可以有效獲得不同用戶(hù)的登錄時(shí)間與次數(shù)。2010-03-03
批處理自動(dòng)登錄QQ小結(jié)及相關(guān)討論
QQ在傳輸密碼的時(shí)候,先做一次MD5加密,再做一次BASE64變換,這樣可以得到正常的文本信息以便網(wǎng)絡(luò)傳輸。2011-01-01
批處理bat判斷一個(gè)文件在最近5分鐘內(nèi)是否被更新過(guò)的代碼
這篇文章主要介紹了批處理bat判斷一個(gè)文件在最近5分鐘內(nèi)是否被更新過(guò)的代碼,需要的朋友可以參考下2014-07-07
批處理bat設(shè)置固定IP地址和自動(dòng)IP地址
這篇文章主要介紹了通過(guò)批處理bat設(shè)置固定IP地址和自動(dòng)IP地址的方法,需要的朋友可以參考下2014-07-07
robocopy命令的用法與實(shí)例(Windows?的可靠文件復(fù)制)
Robocopy是一個(gè)功能超強(qiáng)的文件復(fù)制工具,現(xiàn)在win10也自帶64位與32位版本了,該工具來(lái)自windows資源包,現(xiàn)在系統(tǒng)也都集成了,沒(méi)有這個(gè)軟件的可以網(wǎng)上下載即可2022-10-10
定時(shí)檢查網(wǎng)站是否掉線(xiàn)的批處理
定時(shí)檢查網(wǎng)站是否掉線(xiàn)的批處理...2006-10-10

