ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 批处理修改IP地址

批处理修改IP地址

原创 Linux操作系统 作者:封烨 时间:2010-11-26 10:46:58 0 删除 编辑
小小工具,很实用~:)使用netsh命令修改IP地址,而不用去网络邻居修改啦,用批处理更方便了~~:)(直接把下面两段代码分别保存到两个文本,重命名为xxx.bat就可以了)
 
@ echo off
set Adrnm="本地连接"
set Addr=173.6.9.41
set Mask=255.255.255.0
set Gway=173.6.9.1
set Gmetric=1
echo -----------------------------
echo Changing Your Ip Address now , lading...
netsh interface ip set address name=%Adrnm% source=static addr=%Addr% mask=%Mask% >nul
netsh interface ip set address name=%Adrnm% gateway=%Gway% gwmetric=%Gmetric% >nul
echo -----------------------------
echo Your Ip has been Changed!
echo Author : Vine Feng
pause
 
 
 
 
@ echo off
set Adrnm="本地连接"
echo -----------------------------
echo Changing Your Ip Address , now lading...
netsh interface ip set address name=%Adrnm% source=dhcp >nul
echo -----------------------------
echo Your Ip Address has been Changed!
echo Author : Vine Feng
pause

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/10356975/viewspace-680335/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: 数字的累加打印
请登录后发表评论 登录
全部评论

注册时间:2010-11-26

  • 博文量
    43
  • 访问量
    104758