The Command Prompt on Windows 10 has a useful utility called ipconfig that lets you look up your IP address, view network information, and information about the network cards installed on your system. The IP address that it returns though isn’t your external IP. It’s your internal IP i.e., the one assigned to you within your network by your router. If you want to look up your external IP, you can Google ‘What is my IP?’ and you will get a different address. If you need to look up your external IP address from the Command Prompt, it’s a little complicated.
The ipconfig utility cannot tell you what your external IP is. This is because you’re never connected directly to the internet. Your router acts as an intermediary which is why this information can’t be looked up. There is a simple work around though.
What you need to do is pull your external IP from a website that can see it and also return the information. Your external IP isn’t hidden from websites unless you mask it with a VPN on Windows for privacy so all websites can see. The trick is finding a website that can also return that same information in Command Prompt. To do that, run the command below.
nslookup myip.opendns.com. resolver1.opendns.com
This will return your external IP address as seen by opendns.com. OpenDNS is basically just that; an open and free DNS that you can use if you want to. It’s a website that can, like all other websites, see your external IP address and it can display that information for you.
There are loads of other websites that can return this sort of information and you can use them instead if you want to. The command/script that you need might be a bit more complicated in some cases, but it’s still possible.
You can also look up your external IP in PowerShell. Open PowerShell and run the following command;
(Invoke-WebRequest ifconfig.me/ip).Content.Trim()
It will return your external IP address.
If you get errors with this command, open Internet Explorer and set its default settings. This is necessary or the Invoke-WebRequest command won’t work. If you’ve uninstalled Internet Explorer, you can install it again by enabling it from additional Windows features. You can access additional features from both the Settings app and the Control Panel.
You do not need admin rights to view your external IP address from Command Prompt or from PowerShell.
Fatima Wahab
Fatima has been writing for AddictiveTips for six years. She began as a junior writer and has been working as the Editor in Chief since 2014.
Fatima gets an adrenaline rush from figuring out how technology works, and how to manipulate it. A well-designed app, something that solves a common everyday problem and looks
An IP address is used to identify a computer in a network. There are mainly two types of IP addresses:
- Local Network (LAN) IP address or Local IP address or Private IP address or Internal IP address.
- The Public IP address or External IP address
The private IP is the one that is used within a local area network. This IP is used to identify the computer within the LAN. This private IP can’t be accessed directly from the Internet.
Also, read about how to check the mac address of your computer or any remote computer in the network.
Public or External IP address is the one provided by your Internet Service Provider (ISP). Multiple computers can have a single public IP if a network is set up using a technique called NAT (Network Address Translation). Since public IP is normally not provided free of cost, people use a mixture of private IP addresses that connect to a single public IP address to run the Internet on every network computer in a private network.
Please note that a single computer can have multiple LAN and public IP addresses. Let’s find out how we can find the private and public IP addresses in Windows using command-line options.
Table of Contents
Find my IP Address (Local Area Network)
If you want to know about the network information of your computer, you can get it from multiple locations. Let’s list down some of the locations and then we’ll go through the command-line option.
- Windows Settings –> Network & Internet
- Control Panel –> Network and Sharing Center
- Task Manager –> Performance tab
Now let’s see how you can get all the network-related information using Command Prompt:
- Open command prompt by going to Run –> cmd.
- Run the following command for IP address lookup:
ipconfig
This will show you the summary of all the connected network interfaces including their assigned IP addresses.
If you want complete information of all the network interfaces on your computer, you can run the following command:
ipconfig /all
Get your public IP address using command-line
Sometimes we need to verify what our external IP address is. Let’s see how we can get the public IP information using command-line in Windows. Please note that you need to be connected to the Internet to use the below-mentioned commands and services.
If you have a home network, you can run these commands on one device even if multiple devices are connected to the Internet. They should all have the same public IP.
Find your public IP address using Command Prompt
You can get public IP information using the command nslookup and the OpenDNS service. Just run the following command on your command prompt and you will get your external IP address.
The following command will get you the public IP address of your computer:
nslookup myip.opendns.com resolver1.opendns.com
Find public IP address of your computer using PowerShell
You can also use PowerShell to get the external/public IP without using any third-party IP lookup tool.
Open PowerShell by going to Run –> powershell. Run the following command to get the public IP address of your computer:
(Invoke-WebRequest ifconfig.me/ip).Content.Trim()
Get your computer public IP address using third-party services
There are a few services on the Internet which can show you the public IP by simply opening a webpage. The benefit of some of these services is that they will show you a host of other related things like IP location, ISP name, Internet protocol (ipv4 and ipv6 address) etc. Here is the list of these third-party services:
- Google.com – Search for “my ip” and Google will show you the public IP of your device.
- Whatismyip.com – Shows a wealth of information about the network including the external IP. What is my IP command line is also available through their API service.
- Myexternalip.com – Simply outputs the public IP in plain text.
- Icanhazip.com – Outputs public IP in text format.
- ifconfig.me – Displays a wealth of information including public IP, user agent, port used, language, etc.
When in doubt, you can always go to your router, which displays the exact information about the public IP and other network info assigned from your ISP. I hope this has been informative for you. Please let us know in the comments section below if any information is missing.
To find your local IP address using the Command Prompt, you can execute the following command:
ipconfig
Understanding IP Addresses
What Is an IP Address?
An IP address, short for Internet Protocol address, is a unique identifier assigned to each device connected to a network. It serves two main functions: network interface identification and location addressing. There are two types of IP addresses you should be aware of: IPv4, which is a 32-bit numerical address often depicted as four octets (like `192.168.1.1`), and IPv6, a newer 128-bit address designed to improve the limitations of IPv4.
Why You Need to Find Your IP Address
Knowing your IP address can be crucial for various tasks. Here is why you might need it:
- Troubleshooting Network Issues: When resolving connectivity problems, identifying your IP helps in diagnostics.
- Network Setup: For tasks like setting up a home network or configuring routers, knowing your IP addresses (both public and private) is essential.
- Security: In security configurations, awareness of your IP address can assist in making sure only trusted devices are accessing your network.
Mastering Cmd: A Quick Guide to Using Cmd Commands
Accessing Command Prompt
How to Open CMD
To find your IP using CMD, you first need to access the Command Prompt. Here are a few ways you can open it:
- Windows Search: Type «cmd» or «Command Prompt» in the search bar and select it from the results.
- Run Command Dialog: Press `Win + R`, type `cmd`, and hit Enter.
- Context Menu Access: Right-click the Start button and select «Command Prompt» or «Windows Terminal.»
Once you have opened Command Prompt, you’re ready to find your IP address!
Mastering Findstr Cmd for Quick Text Searches
Finding Your IP Address Using CMD
How to Find IP on CMD
To find your IP address using CMD, the most essential command you need is:
ipconfig
Upon pressing Enter, you will see a list of all your network interfaces along with their details. The output will typically show various sections, like «Ethernet adapter» for wired connections or «Wireless LAN adapter» for Wi-Fi.
Key Points to Note:
- Look for the line labeled IPv4 Address. This value represents your local IP address.
- If you’re connected to a router, this address is typically in the range of `192.168.x.x` or `10.x.x.x`, which are common for local networks.
Show IP Address CMD
Using the `ipconfig` command gives you detailed information. You can understand the command output by focusing on specific sections:
- Ethernet Adapter: If you are connected via a cable, this section will display relevant information, including your local IP.
- Wireless LAN Adapter: If you are using a Wi-Fi connection, this section informs you of your wireless IP settings.
CMD Get IP Address
While `ipconfig` is the primary command to obtain your local IP, you might also want to know the MAC (Media Access Control) address of your device. You can use:
getmac
The MAC address can sometimes help in resolving conflicts or security configurations, as it uniquely identifies network interface hardware.
Mastering IP Routing Cmd: A Quick Guide
Checking Public IP Address Using CMD
What is My IP Address CMD
A public IP address is what the world sees when you connect to the internet. To check your public IP address, you can use CMD in conjunction with online services.
How to Get Your IP Address CMD
One straightforward method to find your public IP is by using the `curl` command, available for Windows 10 and later:
curl ifconfig.me
This command queries an external service, returning your public IP, which might look something like `203.0.113.1`. If you don’t have access to `curl`, you can try:
nslookup myip.opendns.com resolver1.opendns.com
This command works by querying OpenDNS to return your public IP address as well.
Download File Using Cmd: A Simple How-To Guide
Advanced IP Address Commands
CMD Command to Find IP Address in Different Scenarios
The versatility of CMD allows for more advanced functionalities. For instance, you might need to determine the IP addresses of websites or to diagnose the route data takes to reach a destination.
You can use the `ping` command to find the IP address of a domain:
ping example.com
Upon executing this command, you will see the resulting IP address in the output, alongside response times.
How to Check IP Address Using CMD
If you require comprehensive details about your IP configuration, using `ipconfig /all` will provide more extensive information about each network adapter on your device:
ipconfig /all
In the output:
- You’ll find information about the hostname, DNS servers, and the state of all network adapters.
- This command is particularly useful for troubleshooting conflicts or settings issues.
Running Cmd: Quick Tips for Effective Command Usage
Troubleshooting IP Address Issues
Common CMD Command Errors
When using CMD to find your IP, you might encounter a few common errors, such as «Access Denied» or «Command Not Found.» If CMD does not recognize a command, ensure that you are using the correct syntax. Additionally, run CMD as an administrator if you face permission issues.
How to Check IP Address With CMD for Network Problems
For users encountering connectivity problems, the following commands provide valuable assistance:
-
Releasing and Renewing IP Address:
ipconfig /release ipconfig /renew
This technique often resolves issues stemming from outdated DHCP leases.
-
Diagnostic Commands: Using `ping` or `tracert` (trace route) can help you investigate where a connection might be failing within the network.
tracert example.com
This command traces the route packets take to a network destination, revealing potential points of failure.
Find Cmd: Your Guide to Mastering Cmd Search Commands
Conclusion
By mastering these CMD commands, you can efficiently find your IP using CMD and effectively troubleshoot network issues. Whether for personal use or professional needs, becoming proficient in using the Command Prompt will empower you to navigate your network with confidence.
Cek Ping Cmd: Mastering Network Testing in Cmd
Additional Resources
Make sure to explore additional resources or forums related to CMD and IP addresses for further learning. Practicing these commands will sharpen your skills and expand your toolbox for managing networks effectively.
Необходимость узнать IP адрес компьютера может возникнуть в разных ситуациях. Например, это может потребоваться для подключения к серверу, который работает на компьютере, или просто для проверки подключения с помощью команды ping. В данной инструкции мы расскажем, как узнать IP адрес компьютера через командную строку Windows 10 или Windows 7.
Внутренний и внешний IP
Перед тем как переходить к рассмотрению основного вопроса данной статьи нужно сказать несколько слов о том, что такое внутренний (или локальный) IP адрес и что такое внешний IP адрес.
- Внутренний IP – это IP адрес, который доступен исключительно в локальной сети. Внутренние IP принадлежат к специальным диапазонам и не являются уникальными. Они выдаются локальным роутером и используются для подключения внутри локальной сети, при этом из Интернета внутренние IP адреса не доступны. Внутренние IP адреса также могут называться локальными, частными, внутрисетевыми или серыми.
- Внешний IP – это IP адрес, который доступен из Интернета. Внешние IP уникальны в пределах всего Интернета и позволяют подключаться к компьютеру из любой точки мира. Внешние IP адреса могут также называться реальными или белыми.
Чаще всего, интернет провайдеры выдают пользователям внешние IP адреса. Но, поскольку количество внешних IP ограниченно, то в целях экономии могут выдаваться и внутренние IP адреса.
Команда ipconfig
Для того чтобы узнать IP адрес компьютера с помощью командной строки нужно использовать команду «ipconfig». Данная команда выведет базовую информацию обо всех сетевых подключениях, которые доступны на компьютере. Среди этой информации будет указан и IP адрес.
Также можно использовать команду «ipconfig /all». В этом случае будет выведена более подробная информация о сетевых подключениях. Хотя для получения информации об IP адресе это не обязательно.
Важно понимать, что в зависимости от ситуации, команда «ipconfig» может показывать вам как внутренний, так и внешний IP адрес. Если ваш интернет провайдер выдает вам белый IP и кабель от провайдера подключен напрямую в компьютер, то вы увидите именно внешний IP адрес. Если же вы подключаете кабель не напрямую, а через роутер, либо ваш провайдер выдает вам серый, то вы увидите внутренний IP адрес.
Внутренние IP очень легко отличить от внешних, так как они всегда относятся к этим подсетям:
- От 10.0.0.0 до 10.255.255.255;
- От 172.16.0.0 до 172.31.255.255;
- От 192.168.0.0 до 192.168.255.255;
- От 100.64.0.0 до 100.127.255.255;
Команда nslookup
Если команда «ipconfig» показывает вам внутренний IP адрес, то можно прибегнуть к некоторой хитрости и таки получить внешний IP адрес. Для этого нужно использовать вот такую команду:
nslookup myip.opendns.com. resolver1.opendns.com
Команда «nslookup» позволяет выполнять запросы к системе DNS через командную строку. В указанной выше команде выполняется запрос к DNS серверу «resolver1.opendns.com», который должен выдать IP домена «myip.opendns.com.». Указанный DNS сервер сконфигурирован таким образом, что при запросе этого специального домена, обратно отправляется IP-адрес, с которого поступает запрос. Таким образом мы можем получить внешний IP через командную строку.
Консоль PowerShell
Также можно использовать возможности консоли PowerShell. Для этого последовательно одну за одной нужно выполнить две команды:
$wc = new-object System.Net.WebClient $wc.DownloadString("http://myexternalip.com/raw")
Данные команды просто скачивают и выводят на экран содержимое веб-страницы http://myexternalip.com/raw, которая всегда возвращает внешний IP адрес пользователя, который ее запросил.
Как видно, с помощью командной строки можно очень легко узнать внешний IP адрес компьютера, причем сразу несколькими различными способами.
Посмотрите также:
- Как узнать свой локальный IP
- Как узнать IP адрес своего компьютера
- Как посмотреть IP адрес компьютера
- Как сменить IP адрес компьютера
- Как узнать имя компьютера в локальной сети
Автор
Александр Степушин
Создатель сайта comp-security.net, автор более 2000 статей о ремонте компьютеров, работе с программами, настройке операционных систем.
Остались вопросы?
Задайте вопрос в комментариях под статьей или на странице
«Задать вопрос»
и вы обязательно получите ответ.
С самого начала предупрежу, что статья не о том, как узнать чужой IP-адрес или что-то подобное, а о том, как узнать свой IP-адрес компьютера в Windows 10, 8.1 и Windows 7 (а также в Ubuntu и Mac OS) различными способами — в интерфейсе операционной системы, с помощью командной строки или онлайн, используя сторонние сервисы.
В этой инструкции я подробно покажу, как посмотреть внутренний (в локальной сети вашего роутера или сети провайдера) и внешний IP-адрес компьютера или ноутбука в Интернете, расскажу, чем одно отличается от другого.
- Просмотр IP-адреса в параметрах Windows 10, 8.1 и Windows 7 (и ограничения метода)
- Узнаем внешний IP-адрес компьютера или ноутбука онлайн
- Про отличия внутреннего и внешнего IP и дополнительные методы определения
Простой способ узнать IP-адрес в Windows (и ограничения способа)
Сначала о простом методе для последних версий Windows 10, а затем методы для предыдущих версий ОС (продолжают работать и для 10-ки): достаточно зайти в Пуск — Параметры — Сеть и Интернет. На странице «Состояние» нажать по пункту «Просмотр свойств сети», где и отобразится IP-адрес подключений. Обращайте внимание лишь на те подключения, для которых в поле «Состояние» указано «Работает». Обратите внимание, что для подключения через Wi-Fi роутер там будет указан внутренний IP-адрес, о чем подробнее далее.
Теперь о предыдущих версиях системы. Один из самых простых способов узнать IP-адрес компьютера в Windows 7 и Windows 8.1 для начинающего пользователя — сделать это, просмотрев свойства активного Интернет подключения в несколько кликов. Вот как это делается (о том как сделать то же самое с помощью командной строки будет ближе к концу статьи):
- Кликните правой кнопкой мыши по значку соединения в области уведомлений справа внизу, нажмите «Центр управления сетями и общим доступом» (в Windows 10 слегка по-другому: Как открыть Центр управления сетями и общим доступом Windows 10).
- В Центре управления сетями в меню справа выберите пункт «Изменение параметров адаптера».
- Кликните правой кнопкой мыши по вашему Интернет-подключению (оно должно быть включено) и выберите пункт контекстного меню «Состояние», а в открывшемся окне нажмите кнопку «Сведения…»
- Вам будет показана информация об адресах текущего подключения, включая IP-адрес компьютера в сети (смотрим поле IPv4 адрес).
Главный недостаток данного способа в том, что при подключении к Интернету через Wi-Fi роутер, в этом поле скорее всего будет отображаться внутренний адрес (обычно начинается с 192), выдаваемый маршрутизатором, а обычно требуется узнать внешний IP адрес компьютера или ноутбука в сети Интернет (о том, чем отличаются внутренний и внешний IP адреса вы можете прочитать далее в этой инструкции).
Узнаем внешний IP-адрес компьютера с помощью Яндекс
Многие пользуются для поиска в Интернете Яндексом, однако не все знают, что свой IP адрес можно посмотреть прямо в нем. Для этого просто введите две буквы «ip» в строку поиска. Первый же результат будет отображать внешний IP адрес компьютера в Интернете. А если нажать «Узнайте все о своем соединении», то вы также сможете получить информацию о регионе (городе), к которому относится ваш адрес, используемом браузере и, иногда, некоторую другую. Можно просто зайти на страницу https://yandex.ru/internet/ для просмотра сведений о своем IP-адресе и других параметрах подключения, а также для измерения скорости Интернета.
Тут я отмечу, что некоторые сторонние сервисы определения IP, которые будут описаны ниже, могут показывать более детальную информацию. А потому иногда предпочитаю пользоваться ими.
Внутренний и внешний IP-адрес
Как правило, ваш компьютер имеет внутренний IP-адрес в локальной сети (домашней) или подсети провайдера (при этом, если ваш компьютер подключен к Wi-Fi роутеру, то он уже находится в локальной сети, даже если других компьютеров нет) и внешний IP адрес в Интернете.
Первый может потребоваться при подключении сетевого принтера и других действий в локальной сети. Второй — в общем-то примерно для того же самого, а также для установления VPN-соединения с локальной сетью извне, сетевых игр, прямых подключений в различных программах.
Как узнать внешний IP адрес компьютера в Интернете онлайн
Помимо упомянутого выше сервиса Яндекса, вы можете использовать массу других сервисов, предоставляющих те же сведения об IP. Для этого достаточно зайти на любой сайт, предоставляющий такую информацию, это бесплатно. Например, вы можете зайти на сайт 2ip.ru или ip-ping.ru и сразу же, на первой странице увидеть свой IP-адрес в Интернете, провайдера, и другую информацию.
Как видите, совершенно ничего сложного.
Определение внутреннего адреса в локальной сети или сети провайдера в настройках роутера и с помощью командной строки
При определении внутреннего адреса, учитывайте следующий момент: если ваш компьютер подключен к Интернету через маршрутизатор или Wi-Fi роутер, то с помощью командной строки (способ описан через несколько абзацев) вы узнаете IP-адрес в вашей собственной локальной сети, а не в подсети провайдера.
Для того, чтобы определить свой адрес именно у провайдера, можно зайти в настройки роутера и посмотреть эту информацию в статусе соединения или таблице маршрутизации. Для большинства популярных провайдеров внутренний IP-адрес будет начинаться c «10.» и заканчиваться не на «.1».
В остальных случаях, для того, чтобы узнать внутренний IP адрес, нажмите клавиши Win+R на клавиатуре и введите cmd, а затем нажмите Enter.
В открывшейся командной строке введите команду ipconfig /all и посмотрите значение IPv4-адрес для соединения по локальной сети, не PPTP, L2TP или PPPoE подключения.
В завершение отмечу, что инструкция о том, как узнать внутренний IP-адрес для некоторых провайдеров может показать, что он совпадает с внешним.
Просмотр сведений об IP адресе в Ubuntu Linux и Mac OS X
На всякий случай опишу также, как узнать свои IP адреса (внутренний и внешний) в других операционных системах.
В Ubuntu Linux, как и в других дистрибутивах, можно просто ввести в терминале команду ifconfig —a для получения сведений обо всех активных соединениях. Дополнительно к этому вы можете просто кликнуть мышью по значку соединения в Ubuntu и выбрать пункт меню «Сведения о соединении» для просмотра данных об IP адресе (это лишь пара способов, есть и дополнительные, например, через «Параметры системы» — «Сеть»).
В Mac OS X определить адрес в Интернете вы можете, зайдя в пункт «Системные настройки» — «Сеть». Там вы сможете отдельно просмотреть IP адрес для каждого активного сетевого подключения без особых хлопот.