每次筆記型電腦移到一個新地方, 就要手動設定網路, 真的非常麻煩.
到底有沒有一個自動設定的工具?
有! 就是 netsh.exe
Step 1:
根本不用背指令. 把目前電腦的網路設定 export 出來即可
netsh -c interface dump > c:\NCTU_IP.txt
netsh -c interface dump > c:\OtherSide_IP.txt
Step 2:
要用時, import 之前的的設定檔即可 (自動設定 location1 的網路資料)
netsh -f c:\NCTU_IP.txt
----------------------------------------------------------------------------
其他相關指令
1. 自動設定 IP(192.168.0.100 ), subnet mask(255.255.255.0), default gateway(192.168.0.1)
netsh interface ip set address name="Local Area Connection" static 192.168.0.100 255.255.255.0 192.168.0.1 1
2. 設定 IP 為 DHCP 自動給
netsh interface ip set address "Local Area Connection" dhcp
by Jing
Reference
沒有留言:
張貼留言