1
2
3
4
5
6
7
8
9
10
11
12
13
14
| @echo off
SET ip=10.0.83.48
SET mask=255.255.255.0
SET gateway=10.0.83.126
SET dns=202.101.224.68
SET interface="以太网"
netsh interface ip set address %interface% static %ip% %mask% %gateway% 1
netsh interface ip set dns %interface% static %dns% register=PRIMARY validate=no
echo == 网卡属性已设置 ==
echo IP 地址 : %ip%
echo 子网掩码 : %mask%
echo 网关 : %gateway%
echo DNS : %dns%
pause
|