Pcornel
Windows · IP Configuration

Static IP

Cheat sheet · https://pcornel.dk/topic.php?topic=3076

Back to the Topic

Answer

A static IP is an address set manually on a Windows interface instead of via DHCP, typical for servers. Configure it with New-NetIPAddress or the adapter properties, along with gateway and DNS servers.

Remember

  • Choose an address outside DHCP pools.
  • Set gateway and DNS servers along with the address.
  • Record the address in IPAM.

First checks

  • Get-NetIPConfiguration — addresses, gateway and DNS per interface
  • Get-NetAdapter — adapters, status and link speed
  • Get-NetRoute -AddressFamily IPv4 — routes and metrics
  • Test-NetConnection <host> -Port <p> — ping, route and TCP port test
  • ipconfig /all — full IP configuration
  • Get-NetIPInterface | Select InterfaceAlias,AddressFamily,Dhcp,InterfaceMetric — DHCP state and metric per interface

Verify in this order

static address/prefix/gateway → DNS → no DHCP

Where it usually breaks

First mismatch in host/interface identity → local config/routing/name state → Windows service/provider → firewall/security/session → remote service → application-visible exchange; preserve identity/native error/pre-state before mutation.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=3076

Confirmation

Confirm action

Continue?