IP Addressing | Cyber Security Tutorial - Learn with VOKS
Back Next

IP Addressing


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:

  • The internet
  • A local network (like home Wi-Fi)

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:

  • Ranges from 0 to 255
  • Is called an octet
  • Is 8 bits in binary

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

  • Used on the internet
  • Assigned by your Internet Service Provider

Private IP

  • Used inside local networks
  • Not directly visible on the internet

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:

  • Uses hexadecimal numbers
  • Is much longer
  • Supports far more devices

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:

  • 192.168.1 → Network
  • 10 → Device

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:

  1. Your computer asks DNS for the IP address.
  2. DNS returns an IP address.
  3. Your computer sends data to that IP.
  4. The server responds back to your IP.

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.

Example Code:
# 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
Cyber Security
Introduction Types of Cyber Threats Cyber Security Domains CIA Triad (Confidentiality Integrity Availability) Career paths in Cyber Security Certifications Ethics and Responsible Disclosure Laws and Regulation (e.g. GDPR, NDPR) What is an OS? Types: Window, Linus, macOS Command-line vs GUI OS Internals Overview (filesystems, processes, permissions) Windows command prompt basics Linux Bash Basics File System Navigation Basic Scripting IP Addressing DNS, DHCP Mac Address OSI VS TCP/IP Models Ports and Protocols (TCP, UDP) Common Protocols (HTTPS, FTP, SSH, etc.) Packet structure Firewalls, IDS/IPS, VPNs Common attacks: MITM, Sniffing Secure Network Practices How the Web works HTTP vs HTTPS URLs, Headers, Cookies Client-Server Architecture Introduction To Web Security OWASP Top 10 Overview Common Threats (XSS, SQLi, CSRF) Inpute validation and authentication flow Basic Exploitation demo (e.g. XSS) Burp Suite Introduction Using a Browser For Testing Password security MFA-Antivirus Cyber Hygeine Practice Intro To Tools: Nmap, Wireshark, Netstat
All Courses
Advance AI Bootstrap C C++ Computer Vision Content Writing CSS Cyber Security Data Analysis Deep Learning Email Marketing Excel Figma HTML Java Script Machine Learning MySQLi Node JS PHP Power Bi Python Python for AI Python for Analysis React React Native SEO SMM SQL