Zamil's CSE Directory

computer networking

IP Addresses

Learn how computers identify each other on networks using IP addresses and how these addresses allow data to reach the correct destination.

#networking#ip#internet protocol#addressing
networking, ip, internet protocol, addressing guides

In the previous chapter we explored the TCP/IP Model, the architecture that powers communication on the modern internet.

One of the most important components of this system is the Internet Protocol (IP).

For computers to communicate across networks, they must be able to identify where data should be sent. This is where IP addresses come in.

An IP address acts like a unique identifier for a device on a network.

Without IP addresses, packets traveling across the internet would have no way to know their destination.


What Is an IP Address?

An IP address is a numerical label assigned to a device connected to a network.

It allows computers to:

  • identify themselves on a network
  • send data to the correct destination
  • receive data intended for them

You can think of an IP address like a postal address for a computer.

Just as a mailing address helps deliver a letter to a specific house, an IP address helps deliver data packets to a specific device.


IPv4 Addresses

The most widely used addressing system is called IPv4 (Internet Protocol version 4).

An IPv4 address consists of four numbers separated by dots, like this:


192.168.1.1

Each number can range from 0 to 255, meaning an IPv4 address contains four groups of 8 bits.

This format is often called dotted decimal notation.

Some examples of IPv4 addresses include:


8.8.8.8
172.16.0.5
203.0.113.42

Because IPv4 addresses use 32 bits in total, they allow for approximately 4.3 billion unique addresses.


The Problem of Limited Addresses

When the internet was first designed, 4 billion addresses seemed like more than enough.

However, as the internet grew and billions of devices came online, the available address space began to run out.

Today, the world has far more internet-connected devices than IPv4 addresses.

To address this problem, new technologies and systems were introduced, including IPv6 and Network Address Translation (NAT).


IPv6 Addresses

IPv6 (Internet Protocol version 6) was created to provide a much larger pool of addresses.

Instead of 32 bits, IPv6 uses 128-bit addresses.

An IPv6 address looks very different from IPv4:


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

These addresses are written using hexadecimal numbers separated by colons.

Because IPv6 uses 128 bits, it provides an extremely large number of possible addresses — enough to support an enormous number of devices.

Although IPv6 adoption is increasing, many systems today still use IPv4 alongside IPv6.


Public and Private IP Addresses

Not every device on a network needs a globally unique address.

Networks often use two types of addresses:

Public IP Addresses

A public IP address is visible on the internet and can be reached from outside networks.

Servers, websites, and internet-facing systems typically use public IP addresses.


Private IP Addresses

A private IP address is used inside local networks such as homes, offices, or schools.

These addresses are not directly accessible from the internet.

Common private address ranges include:


10.0.0.0 – 10.255.255.255
172.16.0.0 – 172.31.255.255
192.168.0.0 – 192.168.255.255

Your laptop, phone, or smart TV at home usually has a private IP address assigned by your router.


Local Networks

Devices inside the same network communicate using their local IP addresses.

For example, a home network might look like this:

graph LR
  A[Laptop<br>192.168.1.10]
  B[Phone<br>192.168.1.11]
  C[Router<br>192.168.1.1]

  A --> C
  B --> C

The router connects this local network to the broader internet.

Later we will explore how routers allow many devices with private addresses to share a single public internet connection.


The Loopback Address

Computers also have a special address used for communicating with themselves.

In IPv4 this address is:

127.0.0.1

This is known as the loopback address.

Developers often use it when testing software locally.

For example, a web server running on your own computer might be accessed at:

http://127.0.0.1

This allows programs to communicate internally without using an external network.


Key Ideas to Remember

IP addresses are essential for identifying devices on a network.

Important ideas from this chapter include:

  • An IP address uniquely identifies a device on a network.
  • IPv4 addresses consist of four numbers separated by dots.
  • IPv6 addresses provide a much larger address space.
  • Devices may use public or private IP addresses.
  • Local networks often use private addresses assigned by routers.
  • The loopback address (127.0.0.1) allows a computer to communicate with itself.

IP addressing allows packets to be routed across networks until they reach the correct destination.


What Comes Next

While IP addresses identify computers on the internet, they are not very convenient for humans to remember.

Instead of typing numerical addresses, we usually use domain names like:

google.com
example.org

In the next chapter we will explore the system that converts these names into IP addresses:

Domain Name System (DNS).