Static IP
Cheat sheet · https://pcornel.dk/topic.php?topic=3076
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 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
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