Change IP Address in Windows via Command Prompt
To see a list of interfaces:
netsh interface show interface
To set/change an address:
netsh interface ip set address "Ethernet" static 10.0.0.100 255.255.0.0 10.0.0.1 1
Where "Ethernet" is the name of the interface, 10.0.0.100 is the IP
address, 255.255.0.0 is the subnet mask, and 10.0.0.1 is the default
gateway.
To see a list of NICs with their configured network settings:
netsh interface ip show config
Adding Multiple IP Addresses
netsh interface ipv4 add address “Local Area Connection” 192.168.10.18 255.255.255.0
netsh interface ipv4 add address “Local Area Connection” 172.16.10.100 255.255.240.0
To change the connection back to DHCP, run the following:
netsh interface ip set address "Local Area Connection 3" dhcp
configure a DNS server:
netsh interface ipv4 add dnsserver "Local Area Connection 3" address=8.8.8.8 index=1
No comments:
Post a Comment