What Is an IP Address?
IP stands for:
Internet Protocol
An IP address is a unique number assigned to a device on a network.
Every device connected to:
has an IP address.
Example:
192.168.1.10
This is called an IPv4 address.
IPv4 Structure
IPv4 addresses look like this:
192.168.1.10
It has four numbers separated by dots.
Each number:
Example in binary:
11000000.10101000.00000001.00001010
You do not usually need to work with the binary form, but internally that is how computers understand it.
Public vs Private IP Addresses
There are two main types:
Public IP
Private IP
Common private IP ranges:
192.168.x.x 10.x.x.x 172.16.x.x to 172.31.x.x
Example:
192.168.1.5
That is usually a home device.
Localhost
There is a special IP address:
127.0.0.1
This is called localhost.
It means:
"This computer."
It allows a machine to talk to itself.
IPv6
IPv4 has limited addresses (about 4.3 billion).
Because the internet grew so much, a newer system was created:
IPv6
Example:
2001:0db8:85a3:0000:0000:8a2e:0370:7334
IPv6:
Most modern systems support both IPv4 and IPv6.
Subnet Mask (Basic Idea)
A subnet mask determines:
Which part of the IP address identifies the network
Which part identifies the device
Example:
IP address:
192.168.1.10
Subnet mask:
255.255.255.0
This usually means:
You may also see it written as:
192.168.1.10/24
The /24 means 24 bits are used for the network.
How Data Travels Using IP
When you visit a website:
This is how communication happens across the internet.
Viewing Your IP Address
On Linux or macOS:
ip addr
Or:
ifconfig
On Windows:
ipconfig
Testing Connectivity
You can test connection to another device using ping.
Example:
ping 8.8.8.8
This sends small packets to check if the destination responds.
On Windows:
ping 8.8.8.8
Example: Basic IP Configuration Output (Windows)
ipconfig
You might see:
IPv4 Address. . . . . . . . . . : 192.168.1.20 Subnet Mask . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . : 192.168.1.1
Default Gateway is usually your router.
Summary of Important Terms
IP Address
Unique number identifying a device.
IPv4
32-bit address format like 192.168.1.10
IPv6
128-bit address format like 2001:db8::1
Public IP
Used on the internet.
Private IP
Used inside local networks.
Subnet Mask
Defines network portion vs device portion.
Gateway
Device that connects your network to another network.
# Linux/macOS - show IP address
ip addr
ifconfig
# Ping test
ping 8.8.8.8
:: Windows - show IP address
ipconfig
:: Ping test
ping 8.8.8.8