有要常常切換 IP 的人就會需要這東西

假設我的環境是這樣

網卡名稱:區域連線

IP:192.168.1.1

網路遮罩:255.255.255.0

Gateway:192.168.1.254

DNS:168.95.1.1 跟 168.95.192.1

把下面這四行複製起來貼到記事本後,副檔名存為 bat 就可以了

netsh interface ip set address "區域連線" static 192.168.1.1 255.255.255.0 192.168.1.254 1

netsh interface ip set dns "區域連線" static 168.95.1.1

netsh interface ip add dns name="區域連線" addr=168.95.192.1 index=2

pause

arrow
arrow
    全站熱搜

    Bojack 發表在 痞客邦 留言(0) 人氣()