自动获取IP
netsh interface ip set address name="本地连接" source=dhcp
手动配置IP为192.168.0.3、子网掩码为255.255.255.0
netsh interface ip set address name="本地连接" source=static addr=192.168.0.3 mask=255.255.255.0
转载于:https://www.cnblogs.com/lxwy/archive/2008/12/22/4420705.html