The ipconfig command on Windows and the ip command on Linux both answer one question: what address is this machine actually using right now. That is not the same as what it was configured to use, and the gap is where the troubleshooting value sits.
Bare, it prints address, mask and gateway per interface. With /all it prints where those came from, including which DHCP server issued the lease and when it expires.
- Bare ipconfig shows address, mask and gateway; ipconfig /all shows their origin
- An address starting 169.254 means DHCP failed and the machine gave up
- /release then /renew is the remedy, and it briefly drops the adapter
- /flushdns clears the resolver cache, including cached failures
- On Linux use ip addr and ip route; ifconfig is legacy and often absent
On this page
The outputWhat the bare command tells you, and what it hides
Typed with no parameters, the ipconfig command displays the IPv4 and IPv6 addresses, the subnet mask and the default gateway for every network adapter on the computer. That is four facts, and three of them are usually enough to know whether the machine is on the network it thinks it is on.
What the bare ipconfig output hides is where those values came from. A statically configured address and a DHCP lease look identical. So does an address the machine invented for itself when nothing answered.
ipconfig /all is the command worth typing by default. It displays the full TCP/IP configuration information for every adapter: the host name, the physical address, whether DHCP is enabled, which DHCP server issued the lease, when the lease was obtained and when it expires, and the DNS servers in use.
Those extra lines answer the question the short output raises.
Each of those settings gets its own labeled line, so the names are worth knowing. Host Name and Node Type sit at the top, and under every adapter come Description, Physical Address, DHCP Enabled, IPv4 Address, Subnet Mask, Lease Obtained, Lease Expires, Default Gateway, DHCP Server and DNS Servers.
The lease timestamps in particular are worth reading. A lease obtained three seconds ago on a machine that has been up for a week means something reset the adapter. A lease that expires in ten minutes on a network whose DHCP server is down is a machine about to lose its address.
Most of the diagnostic value is in recognizing the address itself before touching anything.
| What you see | What it means | Where to look |
|---|---|---|
| 169.254.x.x | DHCP did not answer | The link, the VLAN, the scope |
| 0.0.0.0 | No configuration at all | The adapter is down or disabled |
| An address, no gateway | Nothing will route off the subnet | Static config, or a DHCP option |
| Gateway outside the subnet | Unreachable by definition | The mask, or the gateway entry |
| An unfamiliar subnet | Wrong network or wrong SSID | Which port or which wireless |
| Correct everything, nothing works | Usually DNS | The DNS servers listed |
The last row is the one people reach last and should reach second. A machine with a valid address, a valid gateway and a dead DNS server behaves exactly like a machine with no network at all.
169.254The one line that solves the most calls
An IPv4 address beginning 169.254 in the ipconfig output is not an address anybody assigned. It is Automatic Private IP Addressing, the Windows name for a link-local address, and it means the machine asked for a DHCP lease, got no answer, and picked something out of 169.254.0.0/16 so that it could at least talk to other machines that did the same.
The practical translation is short: DHCP did not answer. Everything downstream of that follows. There is no gateway, so nothing routes. There is usually no DNS server, so nothing resolves. The user reports that the internet is down and the internet is fine.
Where to look next, in order: is the cable in and the link up, is the machine on the right VLAN or SSID, is the DHCP scope exhausted, and is there a relay between this subnet and the server that is no longer relaying.
A second machine on the same port with the same symptom points at the network. A second machine that works points at the first machine.
ParametersThe parameters that matter
ipconfig /? display the parameter list for this build
ipconfig /all the full picture, per adapter
ipconfig /release give the IPv4 DHCP lease back
ipconfig /renew ask for an IPv4 lease again
ipconfig /release6 the same, for the IPv6 lease
ipconfig /renew6 the same, for the IPv6 lease
ipconfig /flushdns empty the DNS resolver cache
ipconfig /displaydns display the DNS resolver cache
ipconfig /registerdns re-register this host name in DNS
ipconfig /showclassid adapter display the DHCP class IDs allowed
ipconfig /setclassid adapter change the DHCP class ID
ipconfig /allcompartments include every routing compartment
/release and /renew are the standard remedy for a stale or wrong lease. Release sends a DHCPRELEASE to the server, discards the address configuration, and disables TCP/IP on adapters set to obtain an address automatically. Renew asks again.
Two things follow from that: the machine is briefly off the network between the two, so this is not something to do to a remote machine over its own network connection, and neither one does anything on a statically configured adapter.
Both accept an adapter name, and the name is the one shown by bare ipconfig. Names with spaces need quotes, and the asterisk works as a wildcard, so ipconfig /renew Local* renews every adapter whose name starts with Local.
/flushdns empties the DNS client resolver cache. The part that matters is that the cache holds failures as well as successes, and a cached negative answer is exactly what makes a corrected DNS record appear not to have worked.
How long that failure sticks is set by the zone's SOA record, so flushing locally fixes the machine in front of you and does nothing for anybody else.
/displaydns displays that cache before you clear it, and ipconfig /displaydns is the more useful command of the pair when you are trying to understand rather than fix. It shows both entries loaded from the hosts file and records the machine resolved recently.
/registerdns forces the machine to re-register its name and address with DNS, which is worth knowing when a host resolves to an address it stopped using.
/release6 and /renew6 do the same job on the DHCPv6 lease. The IPv4 parameters do not touch it, so a dual stack machine can look half repaired: the IPv4 address is new and the IPv6 address is the one it has held since it booted.
/showclassid and /setclassid display and change the DHCP class ID an adapter sends, which is how a scope hands different options to different classes of machine. Both take an adapter name, and both have 6 versions for DHCPv6. Most sites never touch either.
/allcompartments widens the output to every routing compartment rather than the default one. A normal computer has a single compartment and the extra output is empty, so this one only earns its keep where something has created another.
Anything that changes state needs an elevated prompt. Reading does not. ipconfig /? displays the parameter list on the machine in front of you, which is more reliable than remembering which commands a given version of Windows accepts.
On LinuxThe same jobs on Linux
The modern tool is ip, from the iproute2 package. ifconfig came from net-tools, has not kept up with the kernel's networking features, and is no longer installed by default on most distributions.
ip addr addresses on every interface (ip a)
ip route the routing table, gateway included (ip r)
ip neigh the neighbor table, the ARP cache (ip n)
ip -s link interface counters, errors and drops
ip link set dev eth0 up bring a network interface up
sudo ip addr add 10.0.0.5/24 dev eth0 add an address, until reboot
resolvectl flush-caches clear the systemd-resolved cache
resolvectl status which resolver is actually in use
The ip command is organized by object. ip addr works on addresses, ip route on the routing table, ip link on the interfaces themselves and ip neigh on the neighbor table, which is what Linux calls the ARP cache.
Learning the four objects is more useful than memorizing commands, because every one of them takes the same show, add and delete verbs.
Two differences from Windows are worth internalizing.
Changes made with ip do not survive a reboot. The command talks to the running kernel. Persistent configuration lives wherever the distribution keeps it: NetworkManager, systemd-networkd, netplan. Setting an address with ip addr add to get out of trouble is fine; leaving it there is how a machine comes back wrong after maintenance.
There is no single DNS cache. Windows has one resolver cache that /flushdns clears. A Linux machine may have systemd-resolved, may have a local dnsmasq, may have neither and go straight out on every query. resolvectl status tells you which situation you are in, and that is the question to answer before trying to clear anything.
DiagnosingReading the output like a diagnostic
Four checks in order, run against the ipconfig /all output, and most network issues fall out at one of them. Each check reads one specific line, and together they separate a connectivity problem on this computer from one somewhere upstream of it.
Is there an address, and is it plausible? 169.254 means DHCP failed. 0.0.0.0 means no configuration at all. An address on a subnet you do not recognize means the machine is on a different network than you assumed, which on wireless usually means it joined the wrong SSID.
Is the mask right? A wrong mask makes some destinations reachable and others not, in a pattern that looks random until you work out which side of the boundary each one is on. This is where knowing how to read a subnet pays for itself.
Is there a gateway, and is it on the same subnet as the address? A gateway outside the local subnet is unreachable by definition, and nothing beyond the local network will work.
Are the DNS servers reachable and correct? A machine with a good address, a good gateway and a DNS server that no longer exists behaves exactly like a machine with no network at all, which is why this is the check people skip and then come back to.
ipconfig /all lists the DNS servers for each adapter, and the fastest confirmation is to resolve one name against each of them by hand. The full sequence is in the network issue checklist, and the DNS side alone is in DNS not resolving.
PitfallsWhere people go wrong
Running bare ipconfig and stopping. It displays the values and not their origin. If DHCP is part of the question, ipconfig /all is the command, and the detailed output is where the answer is.
Running ipconfig /release on a remote machine. It works exactly as documented, which is the problem: the adapter goes down and the session ends with it.
Expecting ipconfig /flushdns to fix a DNS record for everyone. It clears one machine's cache. Every other resolver still holds whatever it holds until its own timer expires.
Treating 169.254 as an address problem. It is a DHCP problem wearing an address. Fixing the address by hand hides it and moves the outage to the next machine.
Using ifconfig on a modern Linux box out of habit. It may not be installed, and where it is, it can misreport interfaces that were configured with tools it does not understand.
Making a change with ip and considering it done. Nothing typed into ip survives the next reboot unless it was also written into the distribution's configuration.
Running itWhere to run ipconfig, and the PowerShell equivalent
ipconfig is a command line tool, so it needs a prompt. Command Prompt, Windows Terminal and PowerShell all run it, and so does typing cmd into the Run box. Type the command and press Enter.
Reading the configuration works from a standard prompt, and the commands that change state want Run as administrator.
There is no graphical version and no settings page that shows the same information. The adapter properties dialog displays what was configured, which is the value ipconfig exists to distrust. Other diagnostics live in the same place, and the ones worth knowing are in cmd commands.
PowerShell adds a second route to the same facts. Get-NetIPConfiguration displays the address, default gateway and DNS servers per adapter, Get-NetIPAddress lists the addresses on their own, Get-DnsClientCache displays the resolver cache, Clear-DnsClientCache empties it and Register-DnsClient re-registers the machine in DNS.
The difference is what comes back. ipconfig prints formatted text that a script has to pick apart, while the cmdlets return objects with properties you can filter, sort and compare across a fleet.
For one computer in front of you, ipconfig /all is still the faster read. The two styles are compared in PowerShell vs bash.
ComparisonWindows and Linux, on the same six jobs
| Criterion | Windows | Linux |
|---|---|---|
| Show addresses | ipconfig | ip addr |
| Show everything | ipconfig /all | ip addr plus ip route |
| Show the gateway | In ipconfig output | ip route |
| Interface errors and drops | Not available here | ip -s link |
| Renew a DHCP lease | ipconfig /renew | dhclient -r then dhclient |
| Clear the DNS cache | ipconfig /flushdns | resolvectl flush-caches, if resolved |
| Survives a reboot | Yes, it reads saved config | No, ip changes are runtime only |
| Legacy tool | winipcfg, long gone | ifconfig, often absent |
The row that catches people moving between the two is the seventh. On Windows the network configuration is a stored setting that ipconfig reflects. On Linux the ip command is a live conversation with the kernel, and the stored configuration is somewhere else entirely.
FAQFrequently asked questions
What does ipconfig do?
It displays the current TCP/IP configuration information and can refresh DHCP and DNS settings. With no parameters it displays the IPv4 and IPv6 address, subnet mask and default gateway for all adapters.
What is the difference between ipconfig and ipconfig /all?
Bare ipconfig displays the address, mask and gateway. ipconfig /all adds the host name, physical address, whether DHCP is enabled, which server gave the lease, when it was obtained and when it expires, and the DNS servers in use.
What does an IP address starting with 169.254 mean?
That DHCP did not answer and the machine assigned itself a link-local address. There is no gateway and usually no DNS, so nothing outside the local segment works. The problem is DHCP, not the address.
How do I release and renew an IP address?
ipconfig /release then ipconfig /renew. Both accept an adapter name, and both do nothing on a statically configured adapter. Do not run them on a machine you are connected to over that adapter.
What does ipconfig /flushdns actually clear?
The DNS client resolver cache on that machine, including negative entries, which is why it is the first thing to try when a corrected DNS record still appears wrong locally.
How do I see what is in the DNS cache?
ipconfig /displaydns. It prints entries preloaded from the hosts file and records resolved recently, which is often more informative than clearing it.
What replaced ifconfig on Linux?
ip, from iproute2. Most distributions no longer install net-tools by default, and ip understands features ifconfig never learned.
How do I see my IP address on Linux?
The ip addr command, usually abbreviated ip a. For the default gateway, ip route or ip r. To see the neighbor table, ip neigh.
Do changes made with the ip command persist?
No. ip talks to the running kernel, so anything it sets is gone after a reboot. Persistent settings live in NetworkManager, systemd-networkd or netplan depending on the distribution.
How do I flush the DNS cache on Linux?
resolvectl flush-caches when systemd-resolved is in use. Check resolvectl status first, because a machine with no local caching resolver has no cache to clear.
Does ipconfig need administrator rights?
Reading does not. Anything that changes state, including /release, /renew, /flushdns and /registerdns, needs an elevated command prompt.
What is ipconfig /registerdns for?
It forces the machine to re-register its DNS names and addresses, which resolves the case where a host still resolves to an address it no longer uses, without rebooting.
Can I use ipconfig on one adapter only?
Yes. /release, /renew, /showclassid and /setclassid all accept an adapter name, quoted if it contains spaces, and the asterisk works as a wildcard.
Why does ipconfig show an address but nothing works?
Usually the gateway or DNS rather than the address. Check that the gateway is inside the same subnet as the address, and that the DNS servers listed still exist and answer.
What is the ifconfig replacement on Linux?
The ip command from the iproute2 package. ip addr replaces ifconfig for addresses, ip link for interface state, ip route for the routing table, and ip neigh for the ARP table. Most current distributions no longer install ifconfig by default, so this ifconfig replacement is the one to learn.
Keep readingRelated concepts
Read next · Addressing What Is DHCP? What should have answered when the machine ended up on 169.254, and the exchange that failed. Open this next9 min- Fundamentals · 9 min Link Local Addresses, and Why One of Them Is Bad News What 169.254 actually is, and why the machine can still reach its neighbors on it and nothing else.
- Diagnostics · 11 min A Network Troubleshooting Checklist, in the Order That Saves Time The order to work through once the address has told you which layer to start at.
- Windows administration · 10 min CMD Commands Grouped by Job, With the Ones That Can Destroy Data The Command Prompt commands worth knowing, grouped by job, with the dangerous ones marked.