---
title: "批处理设置ip"
author: "chenchi1985"
date: "2011-03-24T13:32:07Z"
tags: []
categories: ["操作系统"]
slug: "ip"
draft: false
lastmod: "2011-03-24T13:32:07Z"
id: 973900
url: "https://chenchi1985.iteye.com/blog/973900"
---

自动获取

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

 

固定ip

netsh interface ip&gt;set address "本地连接" static 10.10.10.23 255.255.0.0 10.10.1.254  
netsh interface ip set dns name="本地连接" source=static addr=211.93.24.129  
netsh interface ip add dns "本地连接" 211.93.24.129  
pause