On This Page
TL;DR

An IP address is a unique numerical label assigned to every device connected to the internet. Think of it like a home address, but for your computer, phone, or any internet-connected device.

Key Points:

  • Every device needs an IP to communicate online
  • Two versions exist: IPv4 (older, 4.3 billion addresses) and IPv6 (newer, virtually unlimited)
  • Can be public (visible to internet) or private (local network only)
  • Your ISP assigns your public IP, your router assigns private IPs

Understanding IP Addresses

An Internet Protocol (IP) address is the unique identifying number assigned to every device connected to the internet. When you send an email, stream a video, or browse a website, your device uses its IP address to communicate with servers around the world.

Think of the internet as a massive postal system. Just like your home needs a street address to receive mail, your device needs an IP address to receive data packets from the internet.

How Does an IP Address Work?

When you type netyogi.net into your browser, here's what happens:

  1. DNS Lookup: Your device asks a DNS server "What's the IP address for netyogi.net?"
  2. IP Resolution: DNS responds with 104.21.68.123
  3. Connection: Your device connects to that IP address
  4. Data Transfer: The server sends back the website data to your IP address

Want to see your own IP address right now? Try our What Is My IP tool to instantly view your public IP, location, and ISP details.

IPv4 vs IPv6: What's the Difference?

There are two versions of IP addresses in use today. Here's how they compare:

Feature IPv4 IPv6
Format 192.168.1.1 (4 numbers) 2001:0db8:85a3::8a2e:0370:7334 (8 groups)
Address Space ~4.3 billion addresses 340 undecillion addresses
Adoption Universal (100%) Growing (~40% of traffic)
Example 8.8.8.8 (Google DNS) 2001:4860:4860::8888 (Google DNS)
Length 32-bit 128-bit
Notation Decimal (0-255) Hexadecimal (0-9, a-f)

Why IPv6 Was Created

By the early 2000s, we were running out of IPv4 addresses. With only 4.3 billion possible combinations and billions of devices coming online (smartphones, IoT devices, smart TVs), we needed a solution.

IPv6 provides:

  • Virtually unlimited addresses - 340,282,366,920,938,463,463,374,607,431,768,211,456 addresses (that's 340 undecillion!)
  • Better security - IPsec encryption is built-in
  • Improved routing - More efficient packet delivery
  • No NAT needed - Every device can have a unique public IP

Adoption is slow: Most home networks still use IPv4. Your ISP may provide IPv6, but many websites and services don't fully support it yet. As of 2026, only ~40% of internet traffic uses IPv6.

Types of IP Addresses

1. Public IP Addresses

Your public IP is what the rest of the internet sees. It's assigned by your Internet Service Provider (ISP) and identifies your entire home or business network.

Example: 203.0.113.45

Characteristics:

  • Visible to any website you visit
  • Can reveal your approximate location (city/region)
  • Required for hosting servers or remote access
  • Shared by all devices on your network

How to find it:

# Visit any "What Is My IP" website
curl ifconfig.me

# Or use our tool
https://netyogi.net/what-is-my-ip

2. Private IP Addresses

Your private IP is used within your local network. Your router assigns these to each device (laptop, phone, smart TV) using DHCP (Dynamic Host Configuration Protocol).

Common private IP ranges:

  • 192.168.0.0 to 192.168.255.255 (most home routers use this)
  • 10.0.0.0 to 10.255.255.255 (large corporate networks)
  • 172.16.0.0 to 172.31.255.255 (medium-sized networks)

Example network:

  • Router: 192.168.1.1 (gateway)
  • Laptop: 192.168.1.15
  • Phone: 192.168.1.16
  • Smart TV: 192.168.1.17

Why private IPs? They conserve IPv4 addresses. Millions of homes can use 192.168.1.1 for their router because these addresses are only visible within each local network, not on the internet.

3. Static vs Dynamic IP Addresses

Static IP:

  • Manually assigned, never changes
  • Required for hosting servers (web, email, game servers)
  • Costs extra from most ISPs ($5-15/month)
  • Example use: Running a home web server

Dynamic IP:

  • Automatically assigned by DHCP
  • Changes periodically (when router restarts or lease expires)
  • Standard for home users (included with internet service)
  • More secure (harder to target)

When does a dynamic IP change?

  • Your router restarts
  • Your ISP's DHCP lease expires (usually 24-72 hours)
  • You manually release and renew your IP

How to Find Your IP Address

On Windows:

# Method 1: Command Prompt
ipconfig

# Look for "IPv4 Address" under your active connection
# Example output:
#   IPv4 Address. . . . . . . . . . . : 192.168.1.15
# Method 2: PowerShell (shows public IP)
(Invoke-WebRequest -Uri "https://api.ipify.org").Content

On Mac:

# Method 1: Terminal
ifconfig | grep "inet "

# Method 2: System Preferences
# Go to: System Preferences → Network → Select your connection

On Linux:

# Modern systems
ip addr show

# Or shorter
hostname -I

# Show public IP
curl ifconfig.me

On Mobile:

iPhone/iPad: 1. Settings → Wi-Fi 2. Tap the (i) icon next to your network 3. Look for "IP Address"

Android: 1. Settings → Network & Internet → Wi-Fi 2. Tap your network name 3. Look for "IP Address"

Fastest way: Visit netyogi.net/what-is-my-ip and we'll show you instantly - no commands needed!

Special IP Addresses

Some IP addresses have special meanings and reserved purposes:

IP Address Name Purpose
127.0.0.1 Loopback Your own computer (localhost) - used for testing
0.0.0.0 Default route Represents "any address" or "all addresses"
255.255.255.255 Broadcast Send to all devices on local network
169.254.x.x APIPA Auto-assigned when DHCP fails (no internet)
224.0.0.0 - 239.255.255.255 Multicast Send to multiple specific devices

The Famous 127.0.0.1

127.0.0.1 is called the loopback address or localhost. It always points to your own computer, regardless of your actual IP address.

Common uses:

  • Testing web servers locally: http://localhost:8000
  • Database connections: mysql://127.0.0.1:3306
  • Development environments
# Python web server example
from http.server import HTTPServer, SimpleHTTPRequestHandler

server = HTTPServer(('127.0.0.1', 8000), SimpleHTTPRequestHandler)
print("Server running at http://127.0.0.1:8000/")
server.serve_forever()

Security & Privacy Concerns

What Can Someone Do With Your IP Address?

What your IP reveals:

  • ✅ Your approximate location (city/region, not exact address)
  • ✅ Your Internet Service Provider (ISP)
  • ✅ Your timezone
  • ✅ Your organization (if using corporate network)

What your IP does NOT reveal:

  • ❌ Your exact street address
  • ❌ Your name or personal details
  • ❌ Your browsing history
  • ❌ Your passwords or accounts

Common misconception: Someone having your IP address does NOT mean they can "hack" you. However, it can be used for:

  • DDoS attacks - Flooding your connection with traffic
  • Geolocation tracking - Knowing your general location
  • Port scanning - Checking for open ports (if you run servers)

5 Ways to Protect Your IP Address

  1. Use a VPN (Virtual Private Network)
  2. Masks your real IP with the VPN server's IP
  3. Encrypts your traffic
  4. Popular options: NordVPN, ExpressVPN, ProtonVPN

  5. Use Tor Browser

  6. Routes traffic through multiple encrypted nodes
  7. Changes your IP with each session
  8. Slower but highly anonymous

  9. Use a Proxy Server

  10. Acts as intermediary between you and websites
  11. Simpler than VPN but less secure
  12. Good for bypassing geo-restrictions

  13. Enable Firewall

  14. Blocks unauthorized access attempts
  15. Built into Windows, Mac, Linux
  16. Configure to block incoming connections

  17. Request Dynamic IP from ISP

  18. Your IP changes regularly
  19. Harder for attackers to target you
  20. Usually free (standard for home users)

IP Address Classes (IPv4)

IPv4 addresses are divided into classes based on their first octet (first number):

Class A: Large Networks

  • Range: 1.0.0.0 to 126.255.255.255
  • Networks: 128 networks
  • Hosts per network: 16.7 million
  • Used by: Large corporations, ISPs

Class B: Medium Networks

  • Range: 128.0.0.0 to 191.255.255.255
  • Networks: 16,384 networks
  • Hosts per network: 65,536
  • Used by: Universities, medium businesses

Class C: Small Networks

  • Range: 192.0.0.0 to 223.255.255.255
  • Networks: 2 million networks
  • Hosts per network: 254
  • Used by: Small businesses, home networks

Class D: Multicast

  • Range: 224.0.0.0 to 239.255.255.255
  • Purpose: Sending data to multiple recipients simultaneously
  • Used by: Video streaming, online gaming

Class E: Experimental

  • Range: 240.0.0.0 to 255.255.255.255
  • Purpose: Reserved for research and future use
  • Status: Not used in production

IP Address vs MAC Address

Both identify devices, but they work differently:

Aspect IP Address MAC Address
Purpose Network layer identifier Physical layer identifier
Assigned by ISP or router (DHCP) Device manufacturer
Format 192.168.1.1 00:1A:2B:3C:4D:5E
Can change? Yes (dynamic IPs) No (burned into hardware)
Visible to Internet Only local network
Used for Routing across networks Identifying devices on LAN

Analogy:

  • MAC address = Your device's serial number (permanent)
  • IP address = Your device's current location (can change)

Common IP Address Problems

Problem 1: "169.254.x.x" Address

What it means: Your device couldn't get an IP from DHCP

Causes:

  • Router is offline or malfunctioning
  • DHCP server is disabled
  • Network cable unplugged
  • Wi-Fi not connected

Solution:

# Windows
ipconfig /release
ipconfig /renew

# Mac/Linux
sudo dhclient -r
sudo dhclient

Problem 2: IP Address Conflict

What it means: Two devices have the same IP on your network

Symptoms:

  • Intermittent internet connection
  • "IP address conflict" error message
  • Network drops randomly

Solution: 1. Restart your router (clears DHCP leases) 2. Set devices to use DHCP (not static IPs) 3. Check for rogue devices on your network

Problem 3: Can't Access Local Network

What it means: Your IP is in wrong subnet

Check:

# Your IP should match your router's subnet
# If router is 192.168.1.1, you should be 192.168.1.x
ipconfig  # Windows
ifconfig  # Mac/Linux

Real-World Use Cases

1. Network Troubleshooting

When your internet isn't working, checking your IP address is the first diagnostic step:

  • 169.254.x.x = DHCP problem
  • 0.0.0.0 = No network connection
  • Correct subnet = Router issue or ISP problem

2. Remote Access

To access your home computer from work, you need your public IP:

  • Set up port forwarding on router
  • Use dynamic DNS if IP changes
  • Configure firewall rules

3. Geolocation Services

Websites use your IP to:

  • Show content in your language
  • Display local weather
  • Enforce regional restrictions (Netflix, Hulu)
  • Calculate shipping costs

4. Security & Fraud Prevention

Banks and services use IP addresses to:

  • Detect unusual login locations
  • Block access from high-risk countries
  • Identify bot traffic
  • Prevent account takeovers

5. Server Hosting

Running a web server requires:

  • Static public IP (so domain always points to you)
  • Port forwarding (route traffic to your server)
  • Firewall configuration (allow HTTP/HTTPS)

Advanced Concepts

Network Address Translation (NAT)

NAT allows multiple devices to share one public IP address. Your router performs NAT:

Internet (Public)          Router (NAT)           Local Network (Private)

203.0.113.45      ←→      203.0.113.45      ←→   192.168.1.15 (Laptop)
                          Gateway                 192.168.1.16 (Phone)
                                                  192.168.1.17 (TV)

How it works: 1. Your laptop (192.168.1.15) requests a website 2. Router replaces source IP with public IP (203.0.113.45) 3. Website responds to 203.0.113.45 4. Router forwards response back to 192.168.1.15

Subnetting

Subnetting divides a network into smaller sub-networks:

Example: Company with 1,000 employees

  • Main network: 10.0.0.0/16 (65,536 addresses)
  • Engineering subnet: 10.0.1.0/24 (254 addresses)
  • Sales subnet: 10.0.2.0/24 (254 addresses)
  • Guest Wi-Fi: 10.0.3.0/24 (254 addresses)

Benefits:

  • Better security (isolate departments)
  • Improved performance (less broadcast traffic)
  • Easier management (organize by function)

Want to calculate subnet ranges? Try our Subnet Calculator tool!

CIDR Notation

CIDR (Classless Inter-Domain Routing) is a compact way to represent IP ranges:

  • 192.168.1.0/24 = 192.168.1.0 to 192.168.1.255 (256 addresses)
  • 10.0.0.0/8 = 10.0.0.0 to 10.255.255.255 (16.7 million addresses)
  • 172.16.0.0/12 = 172.16.0.0 to 172.31.255.255 (1 million addresses)

The /24 means:

  • First 24 bits are network portion (fixed)
  • Last 8 bits are host portion (variable)
  • 2^8 = 256 possible hosts

How ISPs Assign IP Addresses

Home Users (Dynamic IP)

  1. You connect to ISP
  2. ISP's DHCP server assigns available IP from their pool
  3. You get a "lease" (typically 24-72 hours)
  4. When lease expires, you might get a different IP
  5. Restarting router usually triggers new IP assignment

Business Users (Static IP)

  1. Business pays for static IP service
  2. ISP manually assigns specific IP(s)
  3. IP never changes unless requested
  4. Required for hosting services
  5. Costs $5-50/month depending on ISP

IP Geolocation: How Websites Know Your Location

Websites can determine your approximate location from your IP address using geolocation databases:

What they can determine:

  • Country (99% accurate)
  • Region/State (95% accurate)
  • City (80-90% accurate)
  • Postal code (70-80% accurate)
  • Latitude/Longitude (±50km radius)

What they CANNOT determine:

  • Your exact street address
  • Your building or apartment number
  • Your name or personal details

How it works: 1. Website sees your IP: 203.0.113.45 2. Looks up IP in geolocation database (MaxMind, IP2Location) 3. Database returns: "Los Angeles, California, USA" 4. Website shows LA-specific content

Curious about any IP's location? Try our IP Lookup tool to see location, ISP, and network details for any IP address.

IPv6 Addressing Explained

IPv6 addresses look intimidating, but they follow logical rules:

Full format:

2001:0db8:85a3:0000:0000:8a2e:0370:7334

Compressed format (same address):

2001:db8:85a3::8a2e:370:7334

Compression rules:

  • Leading zeros can be omitted: 0db8db8
  • Consecutive zero groups can be replaced with :: (only once)
  • 0000:0000:0000::

Common IPv6 addresses:

  • ::1 - Loopback (equivalent to 127.0.0.1)
  • :: - All zeros (equivalent to 0.0.0.0)
  • fe80:: - Link-local addresses (like 169.254.x.x)
  • 2001:4860:4860::8888 - Google Public DNS

Frequently Asked Questions

What is an IP address in simple terms?

An IP address is like a phone number for your device on the internet. It's a unique set of numbers that identifies your computer, phone, or any device so it can send and receive data online. Without an IP address, your device can't communicate with websites, apps, or other devices.

Can two devices have the same IP address?

Not on the same network. Each device on a network must have a unique IP address, otherwise there would be an "IP conflict" and both devices would have connection problems. However, devices on different networks can have the same private IP address (like 192.168.1.1), because private IPs are only visible within their local network.

Is it dangerous if someone knows my IP address?

Generally, no. Your IP address only reveals your general location (city/region) and ISP, not your home address or personal details. However, it can be used for:

  • DDoS attacks - Flooding your connection with traffic (rare for home users)
  • Geolocation tracking - Knowing your approximate location
  • Port scanning - Checking for open ports if you run servers

Best practice: Use a VPN on public Wi-Fi networks to hide your real IP address.

What's the difference between IP address and MAC address?

  • IP address - Identifies your device on a network (can change)
  • MAC address - Physical hardware address burned into your network card (never changes)

Think of MAC as your device's serial number, and IP as its current location. Your MAC address is only visible to devices on your local network, while your IP address is visible to the entire internet.

How often does my IP address change?

If you have a dynamic IP (most home users):

  • Changes when your router restarts
  • Changes when your ISP's DHCP lease expires (usually 24-72 hours)
  • Can be manually changed by restarting your router

If you have a static IP (business users):

  • Never changes unless you request it from your ISP
  • Costs extra ($5-50/month)
  • Required for hosting servers

Can I change my IP address?

Yes, several ways:

  1. Restart your router - Usually assigns a new dynamic IP
  2. Use a VPN - Masks your real IP with VPN server's IP
  3. Use mobile data - Your phone gets a different IP than home Wi-Fi
  4. Contact your ISP - Request a new IP (they may charge a fee)
  5. Wait - Dynamic IPs change automatically every 24-72 hours

What is the 192.168 IP address?

192.168.x.x is a private IP address range reserved for local networks. It's the most common range used by home routers:

  • Router (gateway): Usually 192.168.1.1 or 192.168.0.1
  • Devices: 192.168.1.2 through 192.168.1.254

This range is defined in RFC 1918 and is not routable on the public internet. Millions of homes worldwide use these same addresses because they're only visible within each local network.

Do IP addresses expire?

Dynamic IPs have a "lease time" (typically 24-72 hours). After the lease expires, your ISP's DHCP server may assign you a different IP. However, if no one else needs your IP, you'll often keep the same one.

Static IPs don't expire - you keep them as long as you pay for the service.

Can websites track me using my IP address?

Yes, to some extent. Websites can:

  • ✅ See your IP on every visit
  • ✅ Track your visits over time (if IP doesn't change)
  • ✅ Know your approximate location
  • ✅ Build a profile of your browsing patterns

However, most tracking is done through cookies and browser fingerprinting, not IP addresses. Clearing cookies is more effective than changing your IP for privacy.

What happens if I run out of IP addresses on my network?

Your router's DHCP server has a limited pool of IP addresses (usually 50-250). If all are assigned:

  • New devices can't connect
  • You'll see "Unable to obtain IP address" error

Solutions: 1. Disconnect unused devices - Frees up IPs 2. Restart router - Clears old DHCP leases 3. Expand DHCP pool - Router settings → increase range 4. Use static IPs - Manually assign IPs to some devices (outside DHCP range)

Need to look up network data?

Use our free suite of professional-grade networking tools.

Explore All Tools