What Is an IP Address?

Written by Coursera Staff • Updated on

Explore the history and importance of an IP address, how it works, public versus private IP addresses, and why we need them to communicate on the internet.

[Featured image] A person wearing a plaid shirt sits at a desk and reviews code using a laptop and a separate display monitor.

An IP address (internet protocol address) is a unique number for any device that connects to the internet. IP addresses allow devices to connect to the internet from anywhere in the world. Information is sent over the internet in unique chunks called packets, including the requested data and a header containing metadata. Routers and networking systems must identify both the requester of a packet and the sender of the packet so the data requested is sent from the correct place and received by the proper requester. An IP address identifies the requester and sender, both of which have unique IP addresses.

What makes up an IP address?

An IPv4 address uses a 32-bit long identifier, while an IPv6 address uses up to 128 bits in the identifier. A bit is a binary digit of either one or zero. IP addresses contain a network prefix and a host number. IP addresses are labeled based on the dotted decimal system, which includes four octets, all with eight bits.

Here is an example of an IP address in binary, converted to dotted decimal:

  • Binary: 11100000.10000000.11110000.00001000

  • Dotted decimal:

Until 1993, the amount of bits in the network prefix separated IP addresses into classes. The three main classes were:

  • Class A, which contains over 65,536 host identifiers

  • Class B, which contains 256 to 65,534 host identifiers

  • Class C, which contains less than 254 host identifiers

In 1993, the Internet Engineering Task Force created CIDR (Classless Inter-Domain Routing) notation because of the inefficiencies and fear of IP addresses being ultimately used up in classful notation. CIDR allows for a method of IP addressing that breaks down classful IP addresses into a series of subnets (a network that has been split into multiple subnetworks, or subnets) via subnet masks. This makes for more efficient use of the IP addresses needed for a certain number of hosts.

IP address notation

Classful IP address notation bases itself on a network prefix and host number. They use a key to identify the class a specific IP address was in. Network prefixes and host numbers for classful IPs are as follows: 

  • Class A: Network prefix 8 bits, host number 24 bits

  • Class B: Network prefix 16 bits, host number 16 bits

  • Class C: Network prefix 24 bits, host number 8 bits

Since CIDR notation disregards the use of classes, it shows the network mask for an address and tells the total number of bits using a slash and the number. For example,  /16 means there are 16 bits in the given network mask. CIDR notation also forgoes the need to write out IP addresses in binary notation, making them more accessible and quicker to read. Internet service providers (ISPs) purchase blocks of IP addresses to sell to their customers. 

Public vs. private IP addresses

A router connects the local system (private IP address, including the router) to the world outside the system (public IP addresses). Private addresses only direct packets in the local network. Any traffic outside the private address connects to a “public” IP address. A router tells each packet where to go between the local network and the public internet through public and private IP addresses. This specific use of routing is only used with IPv4 addresses as a way to maximize the finite amount of IP addresses in use. Adopting IPv6 would negate the need to route IP addresses as “public” and “private” since so many IPv6 addresses can exist.

The fact that your local network (home or business) is a “private” IP address does not mean that only you know your IP address. Anytime you use the internet, your public-facing IP address is shown to that specific website. Attackers can breach these server logs of IP addresses and potentially perform a disturbed denial of service (DDoS) attack on your network. A DDoS attack done by a hacker focuses on overloading network equipment with requests so that normal internet users experience an interruption of service. It's important to never give your home or business IP address to anyone online to mitigate DDoS attacks and compromises to your identity. 

  • CPU

  • Router

  • MAC address

  • CIDR

  • IPv4

  • IPv6

  • DDoS attack

  • Subnet mask

Get started in IT with Coursera

If you're looking for a career in IT or want to enhance your current IT career, consider the Google IT Support Professional Certificate on Coursera. In it, you can learn more about IP addresses, computer networking fundamentals, and network troubleshooting tools and techniques. 

Keep reading

Updated on
Written by:

Editorial Team

Coursera’s editorial team is comprised of highly experienced professional editors, writers, and fact...

This content has been made available for informational purposes only. Learners are advised to conduct additional research to ensure that courses and other credentials pursued meet their personal, professional, and financial goals.