1.下載檔案下載
2.解壓縮,解壓密碼demo1234
3.對資料夾內的DnsSetting.bat (以系統管理員身分執行)點兩下),完成。
思考過程:
1.經縣網協助,Google 安全搜尋和 youtube 嚴格搜尋已啟用
dns:163.23.200.1
163.28.80.43
ipv6 dns:
2001:288:5600::1
2001:288:5000:1:163:28:80:43
2.那要如何快速設定學生機DNS?使用BAT
檔案名稱:DnsSettingWin10.bat
內容:
@echo on
netsh interface ip set dns "Ethernet0" static 163.23.200.1
netsh interface ip add dns "Ethernet0" 163.28.80.43
netsh interface ipv6 set dns "Ethernet0" static 2001:288:5600::1
netsh interface ipv6 add dns "Ethernet0" 2001:288:5000:1:163:28:80:43
內容:
@echo on
netsh interface ip set dns "區域網路" static 163.23.200.1
netsh interface ip add dns "區域網路" 163.28.80.43
netsh interface ipv6 set dns "區域網路" static 2001:288:5600::1
netsh interface ipv6 add dns "區域網路" 2001:288:5000:1:163:28:80:43
3.可否讓bat自行判斷作業系統,將上述兩個bat合併成一個
檔案名稱:DnsSetting.bat
內容:
@echo off
systeminfo | find "Windows 10"
if %ERRORLEVEL% == 0 goto Win10
systeminfo | find "Windows 7”
if %ERRORLEVEL% == 0 goto Win7
:Win10
echo "Windows 10"
netsh interface ip set dns "Ethernet0" static 163.23.200.1
netsh interface ip add dns "Ethernet0" 163.28.80.43
netsh interface ipv6 set dns "Ethernet0" static 2001:288:5600::1
netsh interface ipv6 add dns "Ethernet0" 2001:288:5000:1:163:28:80:43
exit
:Win7
echo "Windows 7"
netsh interface ip set dns "區域網路" static 163.23.200.1
netsh interface ip add dns "區域網路" 163.28.80.43
netsh interface ipv6 set dns "區域網路" static 2001:288:5600::1
netsh interface ipv6 add dns "區域網路" 2001:288:5000:1:163:28:80:43
exit
內容:
@echo off
systeminfo | find "Windows 10"
if %ERRORLEVEL% == 0 goto Win10
systeminfo | find "Windows 7”
if %ERRORLEVEL% == 0 goto Win7
:Win10
echo "Windows 10"
netsh interface ip set dns "Ethernet0" static 163.23.200.1
netsh interface ip add dns "Ethernet0" 163.28.80.43
netsh interface ipv6 set dns "Ethernet0" static 2001:288:5600::1
netsh interface ipv6 add dns "Ethernet0" 2001:288:5000:1:163:28:80:43
exit
:Win7
echo "Windows 7"
netsh interface ip set dns "區域網路" static 163.23.200.1
netsh interface ip add dns "區域網路" 163.28.80.43
netsh interface ipv6 set dns "區域網路" static 2001:288:5600::1
netsh interface ipv6 add dns "區域網路" 2001:288:5000:1:163:28:80:43
exit
4.執行DnsSetting.bat會出現錯誤訊息 ,可以無視。
感恩東芳國小蔡忠仁老師提供的協助
那要如何驗證該dns存在呢?
感恩彰化縣網中心林哲明老師提供的協助
請下指令
nslookup dns.chc.edu.tw
就可以得到 163.23.200.1 與 2001:288:5600::1
nslookup chcns.tcrc.edu.tw
就可以得到 163.28.80.43 與 2001:288:5000:1:163:28:80:43
其截圖如下:
1.只要會打字,快速設定電腦教室的電腦為固定ip或dhcp
2.Windows 使用指令修改 IP
3.batch file and windows version
沒有留言:
張貼留言