天天改IP太麻烦,做个BAT方便一些。
- DHCP
netsh interface ipv4 set address "适配器名称" dhcp
netsh interface ipv4 set dns "适配器名称" dhcp
- 固定ip
netsh interface ipv4 set address "适配器名称" static 192.168.0.2 255.255.255.0 192.168.0.1 1
netsh interface ipv4 set dns "适配器名称" static 192.168.0.1