What is an IP address?

An IP address serves as a numerical label for any device hooked up to the internet or a local network. Things like computers, smartphones, and routers all get one of these. It functions much like a digital mailing address, so data packets can find their way to the right spot.

Every time someone goes online to check websites or send emails, their device relies on this IP to handle the exchange of information. Videos and other content flow through the same process. Unique IPs make it possible to direct those packets from sender to receiver without mix ups. Networks and the whole internet depend on them to operate properly.

These addresses do not carry personal details on their own. Still, people can use them to identify an internet service provider or pinpoint a general location. The precision tends to work well in cities. It drops off in more remote rural spots.

Two main versions exist side by side these days. They are IPv4 and IPv6.

IPv4

An IPv4 address, which stands for Internet Protocol version 4, address consists of 32 bits of data, divided into four groups of 8 bits each (i.e., 4 octets of 8 bits, equivalent to 4 bytes).

In computing, a bit is the smallest unit of information (it can be 0 or 1, like an on/off switch). An octet (or byte) is a set of 8 bits. In the case of IPv4, these 32 bits are translated into dotted decimal notation for ease of reading: each 8-bit octet therefore takes on a value between 0 and 255. The octets are separated by a dot “.” , giving addresses such as 192.168.0.1

IPv4 addresses are still widely used today. However, they create a big problem due to the limited options available. This stems from the fact that the configuration only allows for four decimal digits. The total number of possible combinations is:

232=42949672962^{32} = 4 294 967 296

In the early 1980s, this amount seemed enormous to everyone involved. But today, it is no longer sufficient for the billions of devices connected everywhere. Take the average person, for example. They may own a smartphone, a PC and several other gadgets. All of these devices require a unique IP address.

Examples of IPv4 addresses

There are various types of IPv4 addresses, which are:

  • Public addresses: 8.8.8.8 (one of Google's public DNS servers), 1.1.1.1 (one of Cloudflare's public DNS servers).

  • Private for internal use: 192.168.1.10, 10.0.0.5, 172.16.50.2

  • Loopback: The loopback address is 127.0.0.1. It acts as a special setup in IPv4. Devices send data to themselves with it. No external network gets involved. Folks use it for local chats. Testing network software and hardware comes into play too. That includes the TCP/IP stack. Developers rely on it for apps needing process communication. It goes by the name localhost.

We will cover the public and private IP differences in a bit. Some background helps first though. Too much info all at once just mixes things up.

Ways of communicating in an IPv4 network

People often wonder about the different ways hosts communicate in an IPv4 network. Hosts in such a network can connect using three main methods.

  • The first one is Unicast. In unicast, packets go from one specific host to another particular host. This setup works for everyday interactions between hosts or in peer-to-peer setups. Those packets always include the source address and the destination address. They can travel within the local network or get routed to other networks as needed.

  • Broadcast comes next. With broadcast, a host sends packets to every other host on the local network. For most default setups, the broadcast address ends up being the very last address available in that network range. Take something like 192.168.10.255 for example. This kind of communication usually stays confined to the local network only.

  • Then there is Multicast. Multicast involves sending packets from one host to a chosen group of hosts across the network. Depending on how things are configured, this transmission might stick to the local network or extend out to the wider Internet.

IPv6

An IPv6 address, which stands for Internet Protocol version 6, uses a total of 128 bits of data. This configuration offers many more options than IPv4, as the possible combinations reach a very high number, which are:

2128=3,4028236692093846346337460743177e+382^{128} = 3,4028236692093846346337460743177e+38

In IPv6, the address is represented by eight groups, each containing four hexadecimal digits, separated by colons. Take, for example, 2001:0DB8:0000:0000:0000:0000:0000:0001. This address is abbreviated to 2001:DB8::1, where the :: replaces a series of consecutive zero groups.

Each of these four-digit hexadecimal groups corresponds to 16 bits, or basically two bytes. The values in each group range from 0 to 65535.

Ways of communicating in an IPv6 network

IPv6 addresses divide into three primary types for transmission purposes. The key shift from IPv4 involves dropping broadcast mode entirely. Multicast takes its place for those functions.

  • Unicast works by directing a packet to a specific unicast address. That packet arrives at only one destination interface. Several subtypes exist under unicast.

    • Types of Unicast:

      • Link-local addresses resemble the private ones in IPv4. They remain valid just on a single local link. The common prefix for them is fe80::/10.

      • Global addresses, also called aggregatable global, act much like IPv4 public addresses. You can employ them across any network without issues. Their structure consists of:

        • 48 bits for the ISP

        • 16 bits for ISP subnets

        • 64 bits for network hosts

      • The Unspecified address shows up as ::. It signals that no address applies in that context. Systems use it mainly for testing scenarios, for instance.

      • Loopback comes as ::1. A node relies on it to route packets back to itself.

  • Anycast addresses get assigned to multiple interfaces at once. Those interfaces might sit in various locations around the network. When someone sends a packet to an anycast address, delivery heads to the nearest group member only.

  • Multicast addresses point to a collection of interfaces as a group. That group could span across different networks easily. The standard prefix starts with ff. Sending a packet there triggers copies to spread out to every member in the group.

Public and Private IPs, Static and Dynamic IPs

Now that you get what an IP address means and how IPv4 differs from IPv6, we can move on to how these addresses get assigned in real life. We will focus on public versus private IPs along with static versus dynamic ways of handling them.

Public IP Public IP addresses stand out because they are unique across the whole world and show up on the Internet. Your network or router uses one to connect outward, so devices can reach out to the broader web.

Private IP Private IP addresses work just for local setups like LAN or WLAN networks. They cannot route straight onto the Internet. Routers hand them out automatically through DHCP, making sure each device gets its own spot inside the network. Standard IPv4 private address ranges include:

When devices on a private network need to talk to the Internet, they rely on NAT or Network Address Translation. We will cover what NAT means and how it operates a bit later. This setup lets several devices share just one public IP address. It also keeps the inside network out of sight from outside ones.

Static IP A static IP gets set up by hand and stays the same no matter what. People often use them for servers, routers, or printers that need to be found at the exact same spot every time. Example: 192.168.1.100 always identifies the same device.

Dynamic IP Dynamic IPs come from DHCP automatically, and they can switch up with each new session or link. This way addresses get reused smartly, and it adds a layer of privacy too. Example: a PC could have 192.168.1.5 today and 192.168.1.12 tomorrow without manual configuration.

Last updated