首页 > 学院 > 基础常识 > 正文

Windows设置静态&动态ip的脚本

2019-11-01 00:24:24
字体:
来源:转载
供稿:网友

   使用netsh设置静态ip地址:

  @echo off

  netsh interface ip set address "本地连接" static 172.24.83.239 255.255.255.0 172.24.83.247

  netsh interface ip set dns "本地连接" 172.24.102.110

  netsh interface ip add dns "本地连接" 172.24.102.110 index=2

  pause

  使用netsh设置动态ip地址:

  @echo off

  netsh interface ip set address name="本地连接" source=dhcp

  netsh interface ip set dns name="本地连接" source=dhcp

  pause

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表