首页 > 代码库 > window dos 设置网络

window dos 设置网络

->netsh

->pushd interface ip

->set address "本地连接" static 192.168.1.2 255.255.255.0 192.168.1.1

->set dns name="本地连接" source=static addr=192.168.1.1 register=PRIMARY

->add dns "本地连接" 8.8.8.8 index=2

注释:

设置静态IP地址

                                         IP地址          子网掩码            网关

set address "本地连接" static 192.168.1.2 255.255.255.0 192.168.1.1

 

设置DNS

set dns name="本地连接" source=static addr=192.168.1.1 register=PRIMARY

添加DNS

add dns "本地连接" 8.8.8.8 index=2

 

window dos 设置网络