Use this when a Windows machine has no or wrong IP settings, gateway or DNS servers.
IP Configuration
IP configuration on Windows sets each interface's address, mask, gateway and DNS servers, via DHCP or statically. Check it with ipconfig /all or Get-NetIPConfiguration and change it with netsh or New-NetIPAddress.
1. Get-NetIPConfiguration.
2. DHCP vs static per interface.
3. DNS servers correct.
4. Interface metric when several NICs.
5. Renew/apply and test.
interface → address source → gateway → DNS → metric
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
ipconfigPrimary Commands
Configuration and operational commands for this Topic.
ipconfigReferenceDisplay IP configuration of Windows network adapters.
Windows / PowerShell · mixedGet-NetIPAddressVerifyDisplay IP addresses of Windows interfaces.
Windows / Windows Server / PowerShell · mixedNew-NetIPAddressConfigureAssign a static IP address to a Windows interface.
Windows / Windows Server / PowerShell · mixedGet-NetIPConfigurationVerifyAdapter IP, gateway and DNS configuration.
Use when: Use after confirming the Windows Networking target and before changing state.
Quick note: Windows / Windows Server / PowerShell. A running Windows service or successful cmdlet does not prove effective policy, replication, authorization or remote consumer success.
Windows PowerShell · mixedVerification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Checks Verify boundary
ipconfig /all
Get-NetIPConfiguration -Detailed
Test-NetConnection 10.0.0.1
Resolve-DnsName dc01.corp.local
Check address, mask, gateway, DNS servers and DHCP lease; then test gateway, DNS and the target in that order.
Subtopics
Go one level deeper into this subject.
The Windows DHCP client requests an address, mask, gateway, DNS servers and other options from a DHCP server and renews the lease.
Subtopic Static IPA static IP is an address set manually on a Windows interface instead of via DHCP, typical for servers.
Subtopic DNS ServersDNS servers on a Windows interface are the resolvers it queries, in order.
Subtopic Default GatewayThe default gateway is the router Windows sends traffic to when no more specific route exists, shown as the 0.0.0.0/0 route.
Subtopic Interface MetricsInterface metrics rank network interfaces so Windows prefers the lowest-cost one, for example wired over Wi-Fi.
- 169.254.x.x means DHCP failed.
- Only one default gateway per machine normally.
- Static settings override DHCP.
Get-NetIPConfiguration— addresses, gateway and DNS per interfaceGet-NetAdapter— adapters, status and link speedGet-NetRoute -AddressFamily IPv4— routes and metricsTest-NetConnection <host> -Port <p>— ping, route and TCP port testipconfig /all— full IP configurationGet-NetIPInterface | Select InterfaceAlias,AddressFamily,Dhcp,InterfaceMetric— DHCP state and metric per interface
ReferenceImportant terms & boundaries1 section · depth on demand
In depth
Choosing between DHCP and static addressing on Windows:
| Use | Recommendation |
|---|---|
| Clients | DHCP |
| Servers | Static, or DHCP reservations managed centrally |
| Domain controllers, DNS, DHCP servers | Static |
| Cluster nodes, storage NICs | Static, no gateway/DNS registration on non-management NICs |
Document addresses in IPAM (Windows Server IPAM, NetBox) and disable "Register this connection's addresses in DNS" on non-management interfaces to avoid clients resolving servers to unreachable storage IPs.
ReferenceConfiguration & state1 section · depth on demand
Commands
ipconfig /all # addresses, gateway, DNS, DHCP lease
Get-NetIPConfiguration # same in PowerShell
Get-NetIPAddress -AddressFamily IPv4
ipconfig /release ; ipconfig /renew # new DHCP lease
ipconfig /flushdns
An address 169.254.x.x (APIPA) means DHCP did not answer. Check the link, the VLAN and the DHCP relay.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in IP Configuration. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://learn.microsoft.com/en-us/windows-server/networking/ · confidence 94%