PriceTag HUB / Networking

Computer Networking

Learn computer networks, Wi-Fi, routers, IP addressing, network protocols, troubleshooting, and network security through practical guides and step-by-step explanations.

Networking / IP Addressing

IPv4 and IPv6: Differences, Examples and Uses

IPv4 and IPv6 are two versions of the Internet Protocol. They provide addresses that help devices communicate across local networks and the internet. This guide explains their formats, differences, uses, and security considerations.

What are IPv4 and IPv6?

Internet Protocol (IP) helps route packets between devices and networks. IPv4 is the older version and remains widely used. IPv6 was developed mainly to provide a much larger address space for the growing number of connected devices.

Both protocols perform network-layer addressing, but they use different address formats and packet headers.

IPv4 example: 192.168.1.10

IPv6 example: 2001:db8::10

Advertisement

What is IPv4?

IPv4 stands for Internet Protocol version 4. It uses 32-bit addresses, allowing 2³² possible bit patterns, or approximately 4.3 billion addresses before accounting for reserved ranges and allocation rules.

IPv4 address format

An IPv4 address has four decimal numbers called octets. Each octet represents eight bits and ranges from 0 to 255. Dots separate the octets.

192.168.1.10

Four octets × eight bits = 32 bits.

Where is IPv4 used?

  • Home routers and Wi-Fi networks.
  • Office computers, printers, and servers.
  • Web servers and internet services.
  • Private networks that use Network Address Translation (NAT).

Addresses such as 192.168.1.10 are commonly used inside private networks. An IP address alone does not determine whether a device is secure.

What is IPv6?

IPv6 stands for Internet Protocol version 6. It uses 128-bit addresses, providing 2¹²⁸ possible address combinations. Its larger address space helps support the continued growth of internet-connected devices.

IPv6 address format

IPv6 uses hexadecimal digits from 0 to 9 and A to F. A full address contains eight groups separated by colons.

2001:0db8:0000:0000:0000:0000:0000:0010

The shortened form is:

2001:db8::10

Leading zeros in a group can be omitted. One consecutive sequence of all-zero groups can be replaced with ::. This double-colon notation can appear only once in an address.

Common IPv6 address types

TypePurposeExample
Global unicastGlobally routable addressing2001:4860::1
Link-localCommunication on the local linkfe80::1
LoopbackThe local device itself::1
Unique localPrivate internal networksfd12::1

Note: These are illustrative examples. The range 2001:db8::/32 is reserved for documentation and should not be used as a real public address allocation.

Advertisement

IPv4 vs IPv6: Key differences

Address size is the main difference, but the protocols also differ in header structure, broadcast behavior, and address configuration.

FeatureIPv4IPv6
Address size32 bits128 bits
FormatDecimal numbersHexadecimal groups
Example192.168.1.102001:db8::10
Address spaceAbout 4.3 billion possible addressesAbout 3.4 × 10³⁸ possible addresses
NotationFour octets separated by dotsEight groups separated by colons
BroadcastSupports broadcastUses multicast and anycast instead of broadcast
ConfigurationManual, DHCP, and other methodsManual, SLAAC, DHCPv6, and other methods
Base header sizeVariable, normally 20–60 bytesFixed at 40 bytes
Neighbor resolutionARP on Ethernet networksNeighbor Discovery using ICMPv6

Can IPv4 and IPv6 work together?

Yes. Networks can support both protocols while transitioning to IPv6. Common approaches include:

  • Dual stack: Devices and networks run IPv4 and IPv6 at the same time.
  • Tunneling: One protocol is carried inside another across part of a network.
  • Translation: Specific mechanisms allow IPv4-only and IPv6-only systems to communicate across protocol boundaries.

Why IPv4 and IPv6 matter in cybersecurity

Network defenders need to understand both protocols because devices and services may use either one. Securing IPv4 while overlooking enabled IPv6 can leave network traffic outside the intended security controls.

Security practices

  • Configure firewall rules for both protocols where enabled.
  • Maintain an inventory of devices and network addresses.
  • Monitor traffic and investigate unexpected connections.
  • Review IPv6 router advertisements and address configuration.
  • Restrict management access and disable unnecessary services.
  • Test security controls only on networks you are authorized to assess.

IPv6 is not automatically more secure than IPv4. Both require secure configuration, monitoring, patching, and appropriate access controls.

Advertisement

How to check your IPv4 and IPv6 addresses

On Windows, you can use Command Prompt to inspect the addresses configured on your network interfaces.

  1. Press Windows + R.
  2. Type cmd and press Enter.
  3. Run this command:
ipconfig

Look for the IPv4 Address and IPv6 Address fields under your active Wi-Fi or Ethernet adapter. Some adapters may display several IPv6 addresses.

These results show addresses configured on your computer. They do not necessarily show every address used by your router or the public address seen by websites.

Frequently asked questions

1. What is the main difference between IPv4 and IPv6?

IPv4 uses 32-bit addresses with dots between decimal numbers. IPv6 uses 128-bit addresses with colons between hexadecimal groups.

2. Why was IPv6 introduced?

It provides a much larger address space to support the growing number of connected devices.

3. Can a device have both IPv4 and IPv6 addresses?

Yes. A device on a dual-stack network can use both protocols.

4. Is IPv6 automatically more secure?

No. Security depends on correct configuration, firewall policies, monitoring, patching, and access controls.

5. How do I check my IP address on Windows?

Open Command Prompt, run ipconfig, and check the addresses under your active network adapter.

Continue reading

Explore IP addressing

Continue learning about IP addresses and network design.