切换网络BAT

1、切换为DHCP

@netsh interface ip set address name="本地连接" source=dhcp

@netsh interface ip set dns name="本地连接" source=dhcp

2、切换为静态IP

@netsh interface ip set address name="本地连接" source=static addr=xxx.xxx.xxx.xxx mask=255.255.255.0 gateway=xxx.xxx.xxx.xxx

@netsh interface ip set dns name="本地连接" source=static addr=xxx.xxx.xxx.xxx

Leave a Reply

Your email address will not be published. Required fields are marked *

*