Ipconfig command
Ipconfig is a DOS utility that can be used from MS-DOS and the Windows command line to display the network settings currently assigned and given by a network. This command can be utilized to verify a network connection and your network settings.
Availability
Ipconfig is an external command and is available for the following Microsoft operating systems as ipconfig.exe.
- Windows 95
- Windows 98
- Windows Me
- Windows 2000
- Windows XP
- Windows Vista
- Windows 7
- Windows 8
- Windows 10
- Windows 11
Ipconfig syntax
Windows Vista and later syntax
ipconfig [/allcompartments] [/? | /all | /renew [adapter] | /release [adapter] | /renew6 [adapter] | /release6 [adapter] | /flushdns | /displaydns | /registerdns | /showclassid adapter | /setclassid adapter [classid] | /showclassid6 adapter | /setclassid6 adapter [classid] ]
Where adapter Connection name (wildcard characters * and ? allowed, see examples).
/all | Display full configuration information. |
/release | Release the IPv4 address for the specified adapter. |
/release6 | Release the IPv6 address for the specified adapter. |
/renew | Renew the IPv4 address for the specified adapter. |
/renew6 | Renew the IPv6 address for the specified adapter. |
/flushdns | Flush or purge the DNS (domain name system) Resolver cache. |
/registerdns | Refreshes all DHCP (Dynamic Host Configuration Protocol) leases and re-registers DNS names. |
/displaydns | Display the contents of the DNS Resolver cache. |
/showclassid | Displays all the DHCP class IDs allowed for adapter. |
/setclassid | Modifies the DHCP class id. |
/showclassid6 | Displays all the IPv6 DHCP class IDs allowed for an adapter. |
/setclassid6 | Modifies the IPv6 DHCP class id. |
The default is to display only the IP (Internet Protocol) address, subnet mask and default gateway for each adapter bound to TCP/IP.
For release and renew, if no adapter name is specified, then the IP address leases for all adapters bound to TCP/IP will be released or renewed.
For Setclassid and Setclassid6, if no ClassId is specified, then the ClassId is removed.
Windows 2000 and XP syntax
ipconfig [/? | /all | /release [adapter] | /renew [adapter] | /flushdns | /registerdns | /showclassid adapter | /setclassid adapter [classidtoset] ]
/all | Display full configuration information. |
/release | Release the IP address for the specified adapter. |
/renew | Renew the IP address for the specified adapter. |
/flushdns | Flush and purge the DNS Resolver cache. |
/registerdns | Refreshes all DHCP leases and re-registers DNS names. |
/displaydns | Display the contents of the DNS Resolver cache. |
/showclassid | Displays all the DHCP class IDs allowed for adapter. |
/setclassid | Modifies the DHCP class id. |
By default, only the IP address is displayed. The subnet mask and default gateway for each adapter are bound to TCP/IP.
For release and renew, if no adapter name is specified, then the IP address releases for all adapters bound to TCP/IP will be released or renewed.
For SetClassID, if no class id is specified, then the classid is removed.
Windows 95, 98, and Me syntax
ipconfig [/? | /all | /batch[file | /renew_all | /release_all | /renew N | /release N]
/All | Display detailed information. |
/Batch [file] | Write to file or ./WINIPCFG.OUT |
/renew_all | Renew all adapters. |
/release_all | Release all adapters. |
/renew N | Renew adapter N. |
/release N | Release adapter N. |
Ipconfig examples
To get your computer's local network IP address, subnet mask, and default gateway typing "ipconfig" alone displays this information as shown below. Below this command are other ways of how ipconfig can be used.
Realize this is only your local network information. If you're trying to determine your IP address used on the Internet, we suggest viewing our system information page.
ipconfig
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix . : hsd1.ut.comcast.net. IP Address. . . . . . . . . . . . : 192.168.201.245 Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : 192.168.201.1
To get all local computer network information, use the /all switch as shown below, followed by the results that would be seen when using this command.
ipconfig /all
Windows IP Configuration Host Name . . . . . . . . . : COMPUTERH1 DNS Servers . . . . . . . . : 123.45.67.8 111.111.111.1 111.111.111.1 Node type . . . . . . . . . : Broadcast NetBIOS Scope ID. . . . . . : IP Routing Enabled. . . . . : No WINS Proxy Enabled. . . . . : No NetBIOS Resolution Uses DNS : No 0 Ethernet adapter : Description . . . . . . . . : PPP Adapter. Physical Address. . . . . . : 44-44-44-54-00-00 DHCP Enabled. . . . . . . . : Yes IP Address. . . . . . . . . : 123.45.67.12 Subnet Mask . . . . . . . . : 255.255.0.0 Default Gateway . . . . . . : 123.45.67.8 DHCP Server . . . . . . . . : 255.255.255.255 Primary WINS Server . . . . : Secondary WINS Server . . . : Lease Obtained. . . . . . . : 01 01 80 12:00:00 AM Lease Expires . . . . . . . : 01 01 80 12:00:00 AM 1 Ethernet adapter : Description . . . . . . . . : 3Com 3C90x Ethernet Adapter Physical Address. . . . . . : 00-50-04-62-F7-23 DHCP Enabled. . . . . . . . : Yes IP Address. . . . . . . . . : 111.111.111.108 Subnet Mask . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . : 111.111.111.1 DHCP Server . . . . . . . . : 111.111.111.1 Primary WINS Server . . . . : Secondary WINS Server . . . : Lease Obtained. . . . . . . : 11 16 00 12:12:44 AM Lease Expires . . . . . . . :
ipconfig /all |more
This command displays the same information as the previous example, but one line at a time. It can be useful for those looking for specific information or who don't want a lot of lines listed simultaneously. Use Enter to display the next line or the spacebar to display one page at a time.
ipconfig /displaydns
Running the command above would display all the DNS information.
ipconfig /flushdns
Deletes all DNS entries.