ipconfig
Displays all current TCP/IP network configuration values and refreshes Dynamic Host Configuration Protocol (DHCP) and Domain Name System (DNS) settings. Used without parameters, ipconfig displays Internet Protocol version 4 (IPv4) and IPv6 addresses, subnet mask, and default gateway for all adapters.
Syntax
ipconfig [/allcompartments] [/all] [/renew []] [/release []] [/renew6[]] [/release6 []] [/flushdns] [/displaydns] [/registerdns] [/showclassid ] [/setclassid []]
Parameters
Parameter | Description |
---|---|
/all | Displays the full TCP/IP configuration for all adapters. Adapters can represent physical interfaces, such as installed network adapters, or logical interfaces, such as dial-up connections. |
/displaydns | Displays the contents of the DNS client resolver cache, which includes both entries preloaded from the local Hosts file and any recently obtained resource records for name queries resolved by the computer. The DNS Client service uses this information to resolve frequently queried names quickly, before querying its configured DNS servers. |
/flushdns | Flushes and resets the contents of the DNS client resolver cache. During DNS troubleshooting, you can use this procedure to discard negative cache entries from the cache, as well as any other entries that have been added dynamically. |
/registerdns | Initiates manual dynamic registration for the DNS names and IP addresses that are configured at a computer. You can use this parameter to troubleshoot a failed DNS name registration or resolve a dynamic update problem between a client and the DNS server without rebooting the client computer. The DNS settings in the advanced properties of the TCP/IP protocol determine which names are registered in DNS. |
/release [] | Sends a DHCPRELEASE message to the DHCP server to release the current DHCP configuration and discard the IP address configuration for either all adapters (if an adapter is not specified) or for a specific adapter if the adapter parameter is included. This parameter disables TCP/IP for adapters configured to obtain an IP address automatically. To specify an adapter name, type the adapter name that appears when you use ipconfig without parameters. |
/release6 [] | Sends a DHCPRELEASE message to the DHCPv6 server to release the current DHCP configuration and discard the IPv6 address configuration for either all adapters (if an adapter is not specified) or for a specific adapter if the adapter parameter is included. This parameter disables TCP/IP for adapters configured to obtain an IP address automatically. To specify an adapter name, type the adapter name that appears when you use ipconfig without parameters. |
/renew [] | Renews DHCP configuration for all adapters (if an adapter is not specified) or for a specific adapter if the adapter parameter is included. This parameter is available only on computers with adapters that are configured to obtain an IP address automatically. To specify an adapter name, type the adapter name that appears when you use ipconfig without parameters. |
/renew6 [] | Renews DHCPv6 configuration for all adapters (if an adapter is not specified) or for a specific adapter if the adapter parameter is included. This parameter is available only on computers with adapters that are configured to obtain an IPv6 address automatically. To specify an adapter name, type the adapter name that appears when you use ipconfig without parameters. |
/setclassid [] | Configures the DHCP class ID for a specified adapter. To set the DHCP class ID for all adapters, use the asterisk (*) wildcard character in place of adapter. This parameter is available only on computers with adapters that are configured to obtain an IP address automatically. If a DHCP class ID is not specified, the current class ID is removed. |
/showclassid | Displays the DHCP class ID for a specified adapter. To see the DHCP class ID for all adapters, use the asterisk (*) wildcard character in place of adapter. This parameter is available only on computers with adapters that are configured to obtain an IP address automatically. |
/? | Displays Help at the command prompt. |
Remarks
- This command is most useful on computers that are configured to obtain an IP address automatically. This enables users to determine which TCP/IP configuration values have been configured by DHCP, Automatic Private IP Addressing (APIPA), or an alternate configuration.
- If the name you supply for adapter contains any spaces, use quotation marks around the adapter name (for example, «adapter name»).
- For adapter names, ipconfig supports the use of the asterisk (*) wildcard character to specify either adapters with names that begin with a specified string or adapters with names that contain a specified string. For example, Local* matches all adapters that start with the string Local and *Con* matches all adapters that contain the string Con.
Examples
To display the basic TCP/IP configuration for all adapters, type:
ipconfig
To display the full TCP/IP configuration for all adapters, type:
ipconfig /all
To renew a DHCP-assigned IP address configuration for only the Local Area Connection adapter, type:
ipconfig /renew Local Area Connection
To flush the DNS resolver cache when troubleshooting DNS name resolution problems, type:
ipconfig /flushdns
To display the DHCP class ID for all adapters with names that start with Local, type:
ipconfig /showclassid Local*
To set the DHCP class ID for the Local Area Connection adapter to TEST, type:
ipconfig /setclassid Local Area Connection TEST
Related links
ipconfig
Отображает все текущие значения конфигурации сети TCP/IP и обновляет параметры протокола DHCP и системы доменных имен (DNS). При использовании без параметров ipconfig отображает IPv4- и IPv6-адреса, маску подсети и шлюз по умолчанию для всех адаптеров.
Синтаксис
ipconfig [/allcompartments] [/all] [/renew []] [/release []] [/renew6[]] [/release6 []] [/flushdns] [/displaydns] [/registerdns] [/showclassid ] [/setclassid []]
Параметры
Параметр | Описание |
---|---|
/all | Отображает полную конфигурацию TCP/IP для всех адаптеров. Адаптеры могут представлять физические интерфейсы, такие как установленные сетевые адаптеры, или логические интерфейсы, такие как подключения удаленного доступа. |
/displaydns | Отображает содержимое кэша сопоставителя DNS-клиента, включающее как записи, предварительно загруженные из локального файла Hosts, так и все недавно полученные записи ресурсов для запросов имен, разрешенных компьютером. Служба DNS-клиента использует эти сведения для быстрого разрешения часто запрашиваемых имен, прежде чем отправлять запросы на настроенные DNS-серверы. |
/flushdns | Сбрасывает и сбрасывает содержимое кэша сопоставителя DNS-клиента. Во время устранения неполадок DNS эту процедуру можно использовать для удаления отрицательных записей кэша из кэша, а также любых других записей, которые были добавлены динамически. |
/registerdns | Инициирует динамическую регистрацию вручную для DNS-имен и IP-адресов, настроенных на компьютере. Этот параметр можно использовать для устранения неполадок при сбое регистрации DNS-имени или устранения проблемы с динамическим обновлением между клиентом и DNS-сервером без перезагрузки клиентского компьютера. Параметры DNS в дополнительных свойствах протокола TCP/IP определяют, какие имена регистрируются в DNS. |
/Выпуска [] | Отправляет сообщение DHCPRELEASE на DHCP-сервер, чтобы освободить текущую конфигурацию DHCP и отменить конфигурацию IP-адресов для всех адаптеров (если адаптер не указан) или для определенного адаптера, если включен параметр адаптера . Этот параметр отключает TCP/IP для адаптеров, настроенных для автоматического получения IP-адреса. Чтобы указать имя адаптера, введите имя адаптера, которое отображается при использовании ipconfig без параметров. |
/release6 [] | Отправляет сообщение DHCPRELEASE на сервер DHCPv6, чтобы освободить текущую конфигурацию DHCP и отменить конфигурацию IPv6-адресов для всех адаптеров (если адаптер не указан) или для определенного адаптера, если включен параметр адаптера . Этот параметр отключает TCP/IP для адаптеров, настроенных для автоматического получения IP-адреса. Чтобы указать имя адаптера, введите имя адаптера, которое отображается при использовании ipconfig без параметров. |
/Обновить [] | Обновляет конфигурацию DHCP для всех адаптеров (если адаптер не указан) или для определенного адаптера, если включен параметр адаптера . Этот параметр доступен только на компьютерах с адаптерами, настроенными для автоматического получения IP-адреса. Чтобы указать имя адаптера, введите имя адаптера, которое отображается при использовании ipconfig без параметров. |
/renew6 [] | Обновляет конфигурацию DHCPv6 для всех адаптеров (если адаптер не указан) или для определенного адаптера, если включен параметр адаптера . Этот параметр доступен только на компьютерах с адаптерами, настроенными для автоматического получения IPv6-адреса. Чтобы указать имя адаптера, введите имя адаптера, которое отображается при использовании ipconfig без параметров. |
/setclassid [] | Настраивает идентификатор класса DHCP для указанного адаптера. Чтобы задать идентификатор класса DHCP для всех адаптеров, используйте подстановочный знак звездочки (*) вместо адаптера. Этот параметр доступен только на компьютерах с адаптерами, настроенными для автоматического получения IP-адреса. Если идентификатор класса DHCP не указан, текущий идентификатор класса удаляется. |
/showclassid | Отображает идентификатор класса DHCP для указанного адаптера. Чтобы просмотреть идентификатор класса DHCP для всех адаптеров, используйте подстановочный знак звездочки (*) вместо адаптера. Этот параметр доступен только на компьютерах с адаптерами, настроенными для автоматического получения IP-адреса. |
/? | Отображает справку в командной строке. |
Комментарии
- Эта команда наиболее полезна на компьютерах, настроенных для автоматического получения IP-адреса. Это позволяет пользователям определить, какие значения конфигурации TCP/IP были настроены с помощью DHCP, автоматической адресации частных IP-адресов (APIPA) или альтернативной конфигурации.
- Если имя адаптера содержит пробелы, введите его в кавычки (например, «имя адаптера»).
- Для имен адаптеров ipconfig поддерживает использование подстановочного знака звездочки (*) для указания адаптеров с именами, начинающимися с указанной строки, или адаптеров с именами, содержащими указанную строку. Например, соответствует всем адаптерам, Local* начинающимся со строки Local, и *Con* всем адаптерам, содержащим строку Con.
Примеры
Чтобы отобразить базовую конфигурацию TCP/IP для всех адаптеров, введите следующую команду:
ipconfig
Чтобы отобразить полную конфигурацию TCP/IP для всех адаптеров, введите:
ipconfig /all
Чтобы обновить конфигурацию IP-адресов, назначаемую DHCP, только для адаптера подключения к локальной сети, введите следующее:
ipconfig /renew Local Area Connection
Чтобы очистить кэш сопоставителя DNS при устранении неполадок с разрешением имен DNS, введите следующую команду:
ipconfig /flushdns
Чтобы отобразить идентификатор класса DHCP для всех адаптеров с именами, начинающимися с Local, введите:
ipconfig /showclassid Local*
Чтобы задать для идентификатора класса DHCP для адаптера подключения по локальной сети значение TEST, введите:
ipconfig /setclassid Local Area Connection TEST
Связанные ссылки
Ipconfig
Displays all current TCP/IP network configuration values and refreshes Dynamic Host Configuration Protocol (DHCP) and Domain Name System (DNS) settings. Used without parameters, ipconfig displays Internet Protocol version 4 (IPv4) and IPv6 addresses, subnet mask, and default gateway for all adapters.
Syntax
ipconfig [/allcompartments] [/all] [/renew []] [/release []] [/renew6[]] [/release6 []] [/flushdns] [/displaydns] [/registerdns] [/showclassid ] [/setclassid []]
Parameters
Displays the full TCP/IP configuration for all adapters. Adapters can represent physical interfaces, such as installed network adapters, or logical interfaces, such as dial-up connections.
Displays the full TCP/IP configuration for all compartments.
Displays the contents of the DNS client resolver cache, which includes both entries preloaded from the local Hosts file and any recently obtained resource records for name queries resolved by the computer. The DNS Client service uses this information to resolve frequently queried names quickly, before querying its configured DNS servers.
Flushes and resets the contents of the DNS client resolver cache. During DNS troubleshooting, you can use this procedure to discard negative cache entries from the cache, as well as any other entries that have been added dynamically.
Initiates manual dynamic registration for the DNS names and IP addresses that are configured at a computer. You can use this parameter to troubleshoot a failed DNS name registration or resolve a dynamic update problem between a client and the DNS server without rebooting the client computer. The DNS settings in the advanced properties of the TCP/IP protocol determine which names are registered in DNS.
Sends a DHCPRELEASE message to the DHCP server to release the current DHCP configuration and discard the IP address configuration for either all adapters (if an adapter is not specified) or for a specific adapter if the Adapter parameter is included. This parameter disables TCP/IP for adapters configured to obtain an IP address automatically. To specify an adapter name, type the adapter name that appears when you use ipconfig without parameters.
Sends a DHCPRELEASE message to the DHCPv6 server to release the current DHCP configuration and discard the IPv6 address configuration for either all adapters (if an adapter is not specified) or for a specific adapter if the Adapter parameter is included. This parameter disables TCP/IP for adapters configured to obtain an IP address automatically. To specify an adapter name, type the adapter name that appears when you use ipconfig without parameters.
Renews DHCP configuration for all adapters (if an adapter is not specified) or for a specific adapter if the Adapter parameter is included. This parameter is available only on computers with adapters that are configured to obtain an IP address automatically. To specify an adapter name, type the adapter name that appears when you use ipconfig without parameters.
Renews DHCPv6 configuration for all adapters (if an adapter is not specified) or for a specific adapter if the Adapter parameter is included. This parameter is available only on computers with adapters that are configured to obtain an IPv6 address automatically. To specify an adapter name, type the adapter name that appears when you use ipconfig without parameters.
Configures the DHCP class ID for a specified adapter. To set the DHCP class ID for all adapters, use the asterisk (*) wildcard character in place of Adapter. This parameter is available only on computers with adapters that are configured to obtain an IP address automatically. If a DHCP class ID is not specified, the current class ID is removed.
Displays the DHCP class ID for a specified adapter. To see the DHCP class ID for all adapters, use the asterisk (*) wildcard character in place of Adapter. This parameter is available only on computers with adapters that are configured to obtain an IP address automatically.
Displays Help at the command prompt.
Remarks
- This command is most useful on computers that are configured to obtain an IP address automatically. This enables users to determine which TCP/IP configuration values have been configured by DHCP, Automatic Private IP Addressing (APIPA), or an alternate configuration.
- If the name you supply for Adapter contains any spaces, use quotation marks around the adapter name (example: «Adapter Name«).
- For adapter names, ipconfig supports the use of the asterisk (*) wildcard character to specify either adapters with names that begin with a specified string or adapters with names that contain a specified string. For example, Local* matches all adapters that start with the string Local and *Con* matches all adapters that contain the string Con.
Examples
To display the basic TCP/IP configuration for all adapters, type:
ipconfig
To display the full TCP/IP configuration for all adapters, type:
ipconfig /all
To renew a DHCP-assigned IP address configuration for only the Local Area Connection adapter, type:
ipconfig /renew "Local Area Connection"
To flush the DNS resolver cache when troubleshooting DNS name resolution problems, type:
ipconfig /flushdns
To display the DHCP class ID for all adapters with names that start with Local, type:
ipconfig /showclassid Local*
To set the DHCP class ID for the Local Area Connection adapter to TEST, type:
ipconfig /setclassid "Local Area Connection" TEST
Additional references
При подготовке материала использовались источники:
https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/ipconfig
https://learn.microsoft.com/ru-ru/windows-server/administration/windows-commands/ipconfig
https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/dd197434(v=ws.11)