What Is IPv4 And How Does It Work? A Complete Guide

IPv4 is a key technology that enables devices to transfer information over networks and the Internet. IP addressing is essential for getting data to the correct destination, whether you are visiting a website, streaming a video, sending an email, or connecting your smartphone to Wi-Fi.

This article will discuss IPv4, IPv4 address format, types, classes, subnetting, public and private addresses, and IPv4 vs. IPv6 comparison. What is IPv4, and how does it work? If you have searched for information on networking, this post is a complete guide and simple explanation of switches and hubs for beginners, students, and anyone who is learning computer networking.

What Is IPv4?

IPv4 is an Internet protocol used for assigning IP addresses to devices on the internet. IPv4 addresses are 32-bit numbers that are typically displayed in dotted decimal notation, with four numbers separated by periods (e.g., 192.168.1.1). These numbers range from 0 to 255.

IPv4 is short for Internet Protocol version 4. It is a network layer protocol that identifies devices and networks using 32-bit addresses. With 32 bits you can address about 4.29 billion different addresses.

An IPv4 address is most often written as four decimal integers, separated by dots. Every number is an 8-bit chunk called an octet. Each octet can have a value from 0 to 255.

For example:

192.168.1.10 

Here is an example of a normal IPv4 address used in the private network.

Microsoft states that IP addresses are 32-bit values, generally shown as dotted-decimal notation. A subnet mask determines which part of the IP address identifies the network and which part identifies the host.

What Is An IPv4 IP address?

IPv4

An IPv4 address is a number label provided to each device connected to a computer network that uses the Internet Protocol for communication. An IP address is essentially an address within a delivery system that helps networking equipment know where to send messages.

When a computer sends information to a web server, it breaks the data into packets. Within these packets is source and destination address information. Routers read this information and use routing tables to determine where to send packets.

The IPv4 address consists of four octets:

192.168.1.25 

Each octet has 8 bits. So the whole address has 32 bits.

Hence:

8 bits + 8 bits + 8 bits + 8 bits = 32 bits

That is the basic answer to what IPv4 is in networking and why addresses seem different from IPv6 addresses.

How Does IPv4 Work?

To understand how IPv4 works, trace the path of a packet.

Say you want your computer to connect to a website. Here’s how it usually goes:

  • Your device hooks up to a network.
  • It is given an IP configuration, usually by DHCP.
  • Your browser asks a destination server for information.
  • The operating system constructs network packets.
  • Each packet is given source and destination addressing information.
  • Routers verify the destination address.
  • Routers forward packets toward their destination network.
  • The packets arrive at the destination server, and it replies.
  • The response travels back to your device.
  • Routers are therefore crucial to the path network traffic takes.

The IPv4 network address and subnet mask are used by devices to determine whether a destination is local or needs to be reached via a router. Different networking applications utilize various types of IPv4 addresses. The IPv4 address and subnet mask help devices determine whether a destination is local or requires routing.

What Is An IPv4 address format?

The IPv4 address format is comprised of four octets.

For instance:

192.168.10.50 

The decimal representation can also be shown in binary:

11000000.10101000.00001010.00110010 

An octet is a group of eight binary bits.

The first part of an address might represent the network, and the second part the hosts. The actual division relies on the subnet mask or CIDR prefix.

For example:

192.168.10.50/24 

The /24 means that the first 24 bits are for the network’s portion.

The network address is

192.168.10.0 

The host part identifies a particular device on that network.

Types Of IPv4 Addresses

There are many varieties of IPv4 addresses, which are used for different networking applications.

Public IP v4 Address

IPv4 Public Address: An IPv4 public address is globally routable, and devices may use these addresses if automatic network configuration fails to communicate across the public internet. Public addresses can be Internet-facing services, cloud servers, websites, and others that use public addresses. by internet-facing services, cloud servers, websites, etc.

Google Cloud considers external IP addresses to be publicly routable addresses that can connect to the public internet.

Private IPv4 Address

A private IPv4 address is meant for use on a private network and is not immediately routable on the public internet.

The three main private ranges are

10.0.0.0 – 10.255.255.255 

172.16.0.0 – 172.31.255.255 

192.168.0.0 – 192.168.255.255 

These ranges are specified in RFC 1918.

For example, a home router may provide an address to a device like 192.168.1.10, but the router itself will have a public address that it uses to communicate with the internet.

Loopback IP Address

When a device wants to talk to itself, it uses the IPv4 loopback address.

The best-known example is

127.0.0.1 

It is called localhost and is beneficial for testing applications and network services without pushing traffic into an external network.

Link-Local Addresses

IPv4 link-local addressing is associated with the 169.254.0.0/16 range. These addresses: Devices can use these addresses  if automatic network configuration fails to acquire an appropriate address from another source. Special-purpose address blocks are included in the IETF’s IPv4 special-purpose registry.

IPv4 Address Categories

The old IPv4 address classes separated addresses into Class A, B, C, D, and E.

Class A: Used for enormous networks in the past.

Class B: Originally intended for medium-sized networks.

Class C: Traditionally intended for smaller networks.

Class D: Used for multicast.

Class E: Kept for experimental or future use.

Most modern networks employ CIDR rather than the traditional class-based scheme. The classic classes are still described in Microsoft documentation to illustrate the history of networking and the concept of subnetting. in the Microsoft documentation because they help to illustrate the history of networking and the idea of subnetting.

IPv4 Subnetting

IPv4

IPv4 subnetting splits a large network into many logical networks.

Consider, for example:

192.168.1.0/24 

A /24 network contains a total of 256 addresses. In a basic subnet, two addresses are generally saved for network and broadcast activities, which leaves 254 useable host addresses.

Subnetting allows breaking a network into smaller segments, such as departments inside a firm.

My job is to humanize the following text in the English language while retaining its meaning and tone. Do not add or omit any information. Do not add any other text to the output. Example:

  • Human Resources
  • Finance
  • IT
  • Guest Wi-Fi

Each group can have a subnet of its own.

Subnetting allows you to organize networks, allocate addresses, route traffic more efficiently, and segregate it. Microsoft says that subnet masks decide which piece of an IP address is the network and which is the host.

Static And Dynamic IPv4 Addresses

Devices can get addresses in two typical ways: IPv4 static and dynamic address assignment.

A static address is manually set or reserved so that the device can still use the same address. Some infrastructure components, network appliances, and servers may need predictable addressing.

Most often a dynamic address is assigned automatically by DHCP. It can vary over time.

Cloud environments also differentiate between static and ephemeral addresses. Google Cloud explains that an ephemeral address usually doesn’t outlive the resource, while a reserved static address can be assigned until it is released.

Real Example 

Home Wi-Fi Network

Consider a home router connected to an ISP.

The router may have a public address like

203.0.113.20 

Inside the house, it could give private addresses such as

Laptop: 192.168.1.10

Smartphone: 192.168.1.11 Smart TV: 192.168.1.12

When your laptop visits a website, the router often implements Network Address Translation (NAT) so that devices with private addresses can talk to the outside world.

Microsoft notes that private addresses cannot connect directly to the public internet, and NAT or any other gateway mechanism can give internet connectivity.

Cloud server

Think of a virtual machine on Microsoft Azure or Google Cloud.

The server can have an internal address for communication with other resources within its virtual network and an external address for communication with its virtual network and an exterior address to communicate to the public.

Google Cloud differs between internal and external addresses. Internal addresses are not publicly routable, whereas external addresses can be available to the public if configured to allow access from the internet.

This illustrates how the same principles of addressing apply outside the home network to the current cloud architecture.

IPv4 Vs. IPv6

The difference between IPv4 and IPv6 primarily lies in the size and design of their addresses.

IPv4 utilizes 32-bit addresses, and IPv6 uses 128-bit addresses. The explosive growth of the Internet has been such that the available IPv4 address space would not be sufficient to provide for the long-term growth of connected devices.

NIST says IPv4’s 32-bit address space was running out of addresses. CIDR and NAT were designed to slow down the depletion of addresses.

Here is a simple comparison:

FeatureIPv4IPv6
Address size32-bit128-bit
Address example192.168.1.102001:db8::1
NotationDotted decimalHexadecimal
Address spaceAbout 4.29 billionExtremely large
NAT usageCommonGenerally less necessary
DeploymentWidely usedIncreasingly adopted

The difference between IPv4 and IPv6 does not mean that IPv4 is gone. Still, many networks are still running IPv4, and some run dual-stack settings with both.

NIST recommends that organisations carefully plan for IPv6 implementation because they may need to operate IPv4 and IPv6 systems in parallel during the transition.

IPv4 & Network Security

IPv4

IPv4 knowledge is also vital for cybersecurity.

Security teams employ IP addresses for firewall rules, restriction of access, network monitoring, logging, threat detection and incident investigation. But an IP address alone does not indicate who is behind a connection.

Organisations should also be careful when accepting IP addresses as input for their applications. OWASP advocates building security controls with adequate IP address validation and considering both IPv4 and IPv6 representations, especially for SSRF defences.

IPsec NIST includes IPsec as a security technique that can provide authentication, integrity, and confidentiality, and NIST as a security technique that may offer verification, integrity, confidentiality, and replay protection for both IPv4 and IPv6 traffic.

Why Is IPv4 Still Important?

However, IPv4 remains deeply entrenched in home networks, enterprise infrastructure, cloud services, apps and internet access, despite a growing usage of IPv6.

Students learn IPv4 to understand:

  • IP addressing
  • Routing
  • Subnetting
  • NAT
  • DHCP
  • Firewalls
  • Network troubleshooting
  • Cloud networking
  • Cybersecurity monitoring

It also lays the framework to comprehend the transition to IPv6.

Frequently Asked Questions

1. What is an IPv4 address? Provide an example.

An IPv4 address is a 32-bit number that identifies a network interface. For example: 192.168.1.10 This kind of private address is widespread within local networks.

2. How are IPv4 addresses assigned?

The address can be manually configured as a static address or dynamically configured using DHCP. Public addresses may also be assigned to clients or resources by internet service providers and cloud providers.

3. What is a private IPv4 address?

A private address is used in local or private networks and is not routable on the public Internet. The common ranges are 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16.

4. What is a public IPv4 address?

A public address is globally routable and can be used for internet-facing communications. Websites, public servers and other internet access services may use public addresses.

5. What are IPv4 and IPv6?

IPv4 and IPv6 are variants of the Internet Protocol (IP). IPv4 has 32-bit addresses, whereas IPv6 has 128-bit addresses. IPv6 was designed to give a significantly wider address space and more features for networking.

Conclusion

IPv4 continues to be one of the most essential technologies in computer networking. It has a 32-bit addressing system, which is the basis of communication between devices, networks, servers and internet services.

Knowing the IPv4 address format, the difference between public and private addresses, subnetting, network addresses, loopback addresses, static and dynamic assignments, and how IPv4 compares to IPv6 can help beginners build a strong foundation in networking and cybersecurity.

Try Our Tools

If you’re learning networking or cybersecurity, practical tools help you understand technical topics. Discover handy technology and cybersecurity resources for your daily learning, troubleshooting and security needs at the ExplainMeTech tools page.

Reference Links

  1. OWASP – Server-Side Request Forgery Prevention Cheat Sheet
    OWASP SSRF Prevention Cheat Sheet 
  2. NIST – Guidelines for the Secure Deployment of IPv6
    NIST IPv6 Security Guidelines 
  3. Microsoft Learn – TCP/IP Addressing and Subnetting
    Microsoft TCP/IP Addressing and Subnetting 
  4. Microsoft Learn – Core Network Components
    Microsoft Core Network Components 
  5. Google Cloud – IP Addresses
    Google Cloud IP Addresses Documentation

For more useful technology, cybersecurity and digital-security ideas, visit ExplainMeTech.com and browse our latest guides, tools and insights.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top