ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 简单批处理,实现ip地址的自动切换

简单批处理,实现ip地址的自动切换

原创 Linux操作系统 作者:BTxigua 时间:2008-03-18 20:44:23 0 删除 编辑

rem
rem 本批处理主要用来修改ip地址,方便办公室与家里ip地址的切换
rem netsh -c interface ip set address "本地连接" static 220.114.111.253 192.168.0.1 auto
rem netsh interface ip set dns "本地连接" static 211.138.91.1
rem netsh interface ip set address "本地连接" dhcp
rem netsh interface ip set dns "本地连接" dhcp
rem
rem 切换到办公室ip,已经设置了静态的路由,这里不设置默认网关。
rem

netsh -c interface ip set address "本地连接" static 220.114.111.253 255.255.255.0 220.114.111.129 auto
netsh interface ip set dns "本地连接" static 211.162.31.8

exit

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

请登录后发表评论 登录
全部评论

注册时间:2008-01-31

  • 博文量
    101
  • 访问量
    313446