4 Methods to Set a Static and Dynamic IP address in Windows 10

Nov 15, 2021 | Windows

In this tutorial i will show you how to set a Static and Dynamic IP addresses in Windows 10 using different methods

Commands used in the tutorial :

Method-03 : netsh Command

netsh lan show interfaces
netsh interface ipv4 show interfaces

netsh interface ipv4 show config
netsh interface ipv4 show config 11
netsh interface ipv4 show config ethernet

netsh interface ipv4 set address name=”Ethernet” source=static address=10.0.0.100 mask=255.0.0.0 gateway=10.0.0.1
netsh interface ipv4 show config 11

netsh interface ipv4 set dnsservers name=”Ethernet” static 10.0.0.1 primary

netsh interface ipv4 set address name=”Ethernet” source=static address=10.0.0.100 mask=255.0.0.0 gateway=10.0.0.1
netsh interface ipv4 set address “Ethernet” static 10.0.0.100 255.0.0.0 10.0.0.1

netsh interface ipv4 set address Ethernet source=dhcp
netsh interface ipv4 set dnsservers 11 source= dhcp

netsh interface ipv4 show config 11

Method-04 : Powershell Commands

Get-NetIpConfiguration

Get-NetIpInterface
Get-NetIPInterface -interfaceindex 11
Get-NetIpInterface -interfaceindex 11 -AddressFamily ipv4

New-NetIpAddress -InterfaceIndex 11 -IpAddress 10.0.0.100 -PrefixLength 8 -DefaultGateway 10.0.0.1

Set-DnsClientServerAddress -InterfaceIndex 11 -ServerAddress (“10.0.0.1”)
Get-DnsClientServerAddress -InterfaceIndex 11

Set-NetIPInterface -InterfaceIndex 11 -Dhcp Enabled
Get-NetIPInterface -interfaceindex 11

Set-DnsClientServerAddress -InterfaceIndex 11-ResetServerAddresses
get-DnsClientServerAddress -InterfaceIndex 11

Pin It on Pinterest

Share This