[reply]1、更改静态IP地址:
命令:netsh interface ip set address "本地连接" static IP 掩码 网关 跃点数
如: netsh interface ip set address "本地连接" static 192.168.1.2 255.255.255.0 192.168.1.1 1
2、更改DNS:
命令:netsh iterface ip set dns "本地连接" static DNS地址 pimary
如:netsh interface ip set dns "本地连接" static 192.168.1.1 primary
设置静态IP(static)
netsh interface set interface "vEthernet (Default Switch)" enabled
@REM choice /t 10 /d y /n >nul
netsh interface ip set address name="vEthernet (Default Switch)" source=static addr=192.168.100.1 mask=255.255.255.0
netsh interface set interface "vEthernet (Default Switch)" disabled
@REM choice /t 10 /d y /n >nul
netsh interface set interface "vEthernet (Default Switch)" enabled
设置动态获取IP(DHCP)
netsh interface ip set address name="本地连接”source=dhcp
设置动态获取IP(DHCP),静态DNS
netsh interface ip set address name="本地连接”source=dhcp
netsh interface ip set dns name="本地连接”source=static addr=192.168.1.1
设置静态IP(static),动态DNS
netsh interface ip set address name="本地连接 source=static addr=192.168.1.2 mask=255.255.255.0 gateway=192.168.1.1 gwnetric=1
netsh interface ip set dns name="本地连接”source=dhcp
设置静态(static)备用DNS2
netsh interface ip add dns name="本地连接”addr=192.168.1.1 index=2
[/reply]
1、更改静态IP地址:
命令:netsh interface ip set address "本地连接" static IP 掩码 网关 跃点数
如: netsh interface ip set address "本地连接" static 192.168.1.2 255.255.255.0 192.168.1.1 1
2、更改DNS:
命令:netsh iterface ip set dns "本地连接" static DNS地址 pimary
如:netsh interface ip set dns "本地连接" static 192.168.1.1 primary
设置静态IP(static)
netsh interface set interface "vEthernet (Default Switch)" enabled
@REM choice /t 10 /d y /n >nul
netsh interface ip set address name="vEthernet (Default Switch)" source=static addr=192.168.100.1 mask=255.255.255.0
netsh interface set interface "vEthernet (Default Switch)" disabled
@REM choice /t 10 /d y /n >nul
netsh interface set interface "vEthernet (Default Switch)" enabled
设置动态获取IP(DHCP)
netsh interface ip set address name="本地连接”source=dhcp
设置动态获取IP(DHCP),静态DNS
netsh interface ip set address name="本地连接”source=dhcp
netsh interface ip set dns name="本地连接”source=static addr=192.168.1.1
设置静态IP(static),动态DNS
netsh interface ip set address name="本地连接 source=static addr=192.168.1.2 mask=255.255.255.0 gateway=192.168.1.1 gwnetric=1
netsh interface ip set dns name="本地连接”source=dhcp
设置静态(static)备用DNS2
netsh interface ip add dns name="本地连接”addr=192.168.1.1 index=2