news.tpi.pl napisał(a):
> Mam trywialny problem:
> Jakim poleceniem z konsoli zamienić nr IP np: 192.168.1.2 na 192.168.1.11
>
> z góry dziekuję za odpowiedź
>
>
Oto odpowiedź. (po angielsku)
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.
1) 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
2) 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: The InterfaceName parameter must match the name of the interface
as specified in Network Connections. If InterfaceName contains spaces,
use quotation marks around the text (for example, "Interface Name").
3) 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. For example, to change my NIC, 3COM, from
10.0.0.11 to a static address of 10.0.0.111 with the same subnet mask
and the default gateway with a metric of 1:
netsh interface ip set address 3COPM static 10.0.0.11 255.255.0.0
10.0.0.111 1
-- Marcin Szczygielski marcs(at)klub(.)it-faq(.).pl <--->Received on Thu Feb 24 09:50:32 2005
To archiwum zostało wygenerowane przez hypermail 2.1.8 : Thu 24 Feb 2005 - 10:42:06 MET