2008年9月12日 星期五

Netsetman網路環境設定切換軟體

netsetman,限個人及教育單位可免費使用,提供6組網路環境設定切換(IP位址、Subnet Mask子網路遮罩、Gateway預設閘道、
DNS位址、電腦名稱、群組、Wins伺服器、預設印表機、執行腳本)等

微軟相關網路設定NETSH指令:
顯示現有網路設定 至ShowNIC.txt
Netsh interface dump > ShowNic.txt
Netsh exec >> ShowNic.txt


以下,NIC1為筆者網卡名稱(ncpa.cpl),IP,DNS及WINS依隨公司網路環境不同.

批次檔將設定網卡IP/DNS/WINS,DNS均指為內部

 netsh interface ip set address name="NIC1" source=static addr=192.168.2.46 mask=255.255.255.0
netsh interface ip  set address name="NIC1" gateway=192.168.2.254 gwmetric=0
netsh interface ip  set dns name="NIC1" source=static addr=192.168.1.2
netsh interface ip  add dns name="NIC1" addr=192.168.1.3 index=2
netsh interface ip  set wins name="NIC1" source=static addr=192.168.1.3
netsh interface ip  add wins name="NIC1" addr=192.168.1.2 index=2



批次檔將Google 8.8.8.8 DNS設為第1台外部DNS,另一台設為內部
netsh interface ip set address NIC1 source=static addr=192.168.2.46 mask=255.255.255.0
netsh interface ip set dns name="NIC1" source=static addr=8.8.8.8 register=PRIMARY
netsh interface ip add dns name="NIC1" addr=192.168.1.2 index=2