Windows如何用命令修改IP地址,动态和静态切换
来源:互联网 发布:康奈尔大学知乎 编辑:程序博客网 时间:2024/04/25 17:56
You can use the netsh command in Windows 2000 to script the process of changing a computer from a static Internet Protocol (IP) address to Dynamic Host Configuration Protocol (DHCP) or vice versa. The netsh command accomplishes this task without the need to restart the computer. This feature is particularly useful for laptops that move from one environment to another, when it is necessary to use statically assigned IP addresses at one location and DHCP assigned IP addresses at another.
To switch the specified adapter from a static address to DHCP, type the following command:
netsh interface ip set address "Local Area Connection" dhcp
NOTE: Typing this command changes the interface named "Local Area Connection" to DHCP.
To display all of the adapters in the computer with their current IP addresses to determine the correct adapter name, type the following command:
Netsh interface ip show config
To change to a static address, type the following command:
netsh interface ip set address "Local Area Connection" static ipaddr subnetmask gateway metric
NOTE: Replace ipaddr with the static IP address, subnetmask with the subnet mask, gateway with the default gateway and, if necessary, metric with the appropriate metric. The following example changes the interface "Local Area Connection" to a static address of 192.168.0.10 with a subnet mask of 255.255.255.0, and the interface has a default gateway of 192.168.0.1 with a metric of 1:
netsh interface ip set address "Local Area Connection" static 192.168.0.10 255.255.255.0 192.168.0.1 1
http://support.microsoft.com/kb/257748
- Windows如何用命令修改IP地址,动态和静态切换
- CENTOS 用命令行修改静态ip
- 用命令修改ip
- Windows下用命令行修改IP地址的方法详解(附批处理文件)
- Windows用命令行修改ip地址以及wifi热点建立过程
- 用命令netsh修改IP
- 如何用命令自动设置电脑IP地址和DN…
- ubuntu下如何用命令查看IP地址
- Windows下用命令行修改IP详解,附批处理文件
- 用命令行netsh修改windows的ip、网关、dns
- 用命令行netsh修改windows的ip、网关、dns
- 如何快速切换静态和动态ip
- CentOS下用命令查看IP地址
- CentOS下用命令查看IP地址
- windows/linux用命令配置IP
- windows系统用命令行netsh修改网络连接的ip、网关、dns
- 用命令控制网卡和IP
- 切换电脑静态ip和动态ip
- 短距离无线定位技术
- ARM Linux静态映射分析
- open 加载和处理图像
- I/O资源如何映射到内核虚拟空间
- C#算法时间测试
- Windows如何用命令修改IP地址,动态和静态切换
- TQ2440 Linux 系统移植(转)
- C++学习总结_防止内存泄漏
- 装配线调度问题 的 动态规划实现
- windows下建立gcc/g++/gdb/make编译及调试C/C++的IDE环境
- POS58票据热敏打印机,怎么用ESC/POS命令控制打印
- 创意
- C#版OPOS打印(基于北洋OPOS SDK二次开发包,支持EPSON和北洋、佳博、商祺等支持标准ESC/POS指令的POS打印机)
- NFS使用方法详解