netsh 配置IP AND DNS

    xiaoxiao2021-03-25  65

    netsh命令,设置ip,dns。 

    固定IP和DNS.bat

    @echo off cls color 0A Echo ******************************************************************************* Echo           changing ip address and DNS servier,please wait........................................... Echo ******************************************************************************* cmd /c netsh interface ip set address name="Local Area Connection" source=static addr=192.168.1.136 mask=255.255.255.0 gateway=192.168.1.1 gwmetric=1 cmd /c netsh interface ip set dns name="Local Area Connection" source=static addr=192.168.1.1 cmd /c netsh interface ip add dns name="Local Area Connection" addr=127.0.0.1 index=2 ipconfig /all Echo ******************************************************************************* Echo          OK!!sucessfully!Please press any key to continue………… Echo ******************************************************************************* Pause

    动态IP和DNS.bat

    @echo off cls color 0A Echo ******************************************************************************* Echo          changing ip address and DNS servier,please wait........................................... Echo ******************************************************************************* netsh interface ip set address name="Local Area Connection" source=dhcp netsh interface ip delete dns "Local Area Connection" all ipconfig /flushdns ipconfig /all Echo ******************************************************************************* Echo          OK!!sucessfully!Please press any key to continue………… Echo ******************************************************************************* Pause

    批处理中增加静态ARP绑定网关

    ARP -s 192.168.1.1 00-00-00-00-00-00

    转载请注明原文地址: https://ju.6miu.com/read-40656.html

    最新回复(0)