CAMBIAR DIRECCION IP A TRAVES DE UN FICHERO BAT

0 comentarios

Esto es útil por si trabajáis con el mismo pc en varias Redes o en diferentes lugares, donde tengáis que configurar direcciones IP estáticas y perdáis mucho tiempo en configurar.

Lo primero que tenemos que hacer es crearnos un fichero con extensión .bat, para ello creamos fichero .txt y escribimos lo siguiente para la dirección ip:

NETSH INTERFACE IPV4 SET ADDRESS NAME=<INDICE> STATIC <IP> <MASCARA> <PUERTA DE ENLACE>

Ejemplo:
netsh interface ipv4 set address name=13 static 199.5.84.103 255.255.255.0 199.5.84.242

Y para la DNS:

NETSH INTERFACE IPV4 SET DNS NAME=<INDICE> STATIC <IP> 
Ejemplo:

netsh interface ipv4 set dns name=13 static 199.5.84.87

Si por el contrario queremos ponerlo en modo DHCP:

NETSH INTERFACE IPV4 SET ADDRESS NAME=<INDICE>  DHCP
NETSH INTERFACE IPV4 SET DNS NAME=<INDICE>  DHCP

Ejemplo:

netsh interface ipv4 set Address name=13 DHCP
netsh interface ipv4 set dns name=13 DHCP

Saludos.


0 comentarios:

Publicar un comentario

Related Posts Plugin for WordPress, Blogger...
Copyright 2011 INFORMATICUCHO.
Blogger Template by Noct.