This tool generates random (faked) IPv4 Addresses up to the number of IPs that you specify below (maximum 200).
The format of the IPs will be in four octets like AAA.BBB.CCC.DDD
The randomly generated IPs will include both Private IP ranges (RFC 1918) and also Public IP ranges.
You can use the generated IP addresses for various reasons such as testing of parse operations with Regular Expressions, as test data in log systems etc.
All about IP addresses
What is an IP address? You may be an expert who can answer that question in a second, or you may have heard the term when networking and IT professionals talk to each other about data communication.
Whichever bucket of experience you fall into, this article will dissect an IP address and discuss its role in making the internet tick.
The article will cover a range of core concepts such as binary calculations, IP version 4 and version 6 addresses, how IP addresses are used on the internet and the difference between a public and private address.
There’s plenty to unpack, so let’s go!
Before we proceed, it is paramount to understand exactly what an IP address is. An Internet Protocol (IP) address is a logical address for identifying a specific device on an IP network so that data can reach that device.
Just to put things into perspective, IP networks include the Internet, local networks in our home, large communication networks between buildings in university campuses etc. All of these are IP networks.
IP uses packets to carry information through the network. A packet is a self-contained, independent entity that contains data and sufficient information to be routed from the source to the destination without reliance on previous packets.
Doted-Decimal Notation of IP address
Network device addresses use the binary system to define their location in the network.
IPv4 (version 4) addresses are based on a dotted-decimal notation of a binary number: four 8-bit fields (octets) converted from binary to decimal numbers, separated by dots. This means that all IPv4 addresses consist of 4×8=32 bits.
An example of an IPv4 address written in a dotted-decimal notation is 192.168.10.22.
The binary equivalent of this number is 11000000.10101000.00001010.00010110. You can use any number of bits for a binary number, but for IPv4 addresses, you will always use 8 bits when converting each of the 4 decimal numbers to binary.
The binary system uses only the digits 0 and 1. Therefore, the first digit is 0, followed by 1. If a quantity higher than 1 is required, the binary system goes to 10, followed by 11.
The binary system continues with 100, 101, 110, 111, then 1000, and so on. Building a binary number follows the same logic as building a decimal number, with the only difference that the base is 2 so the exponents represent the power of 2.
If you take the binary number 10011 for example, it represents a sum of (1 x 16) + (0 x 8) + (0 x 4) + (1 x 2) + (1 x 1) = 19. The following figure shows the binary equivalent of the decimal numbers 0 through 19.
Structure of IP address
Every device must be assigned a unique address to communicate on an IP network. This includes hosts or endpoints (such as PCs, laptops, printers, web servers, smartphones, and tablets), as well as intermediary devices (such as routers and switches).
An analogy of IP addresses is postal Physical Street addresses which are necessary to identify the location of specific homes and businesses so that mail can reach them efficiently.
In the same way, logical IP addresses are used to identify the location of specific devices on an IP network so that data can reach those networked hosts.
Every host connected to a network or the internet has a unique IP address that identifies it. Structured addressing is crucial to route packets efficiently.
An IPv4 address is a 32-bit number, is hierarchical, and consists of two parts:
The network address portion (network ID): Network ID is the portion of an IPv4 address that uniquely identifies the network in which the device with this IPv4 address resides.
The network ID is important because most hosts on a network can communicate only with devices in the same network.
If the hosts need to communicate with devices with interfaces assigned to some other network ID, a network device—a router or a multilayer switch—can route data between the networks.
The host address portion (host ID): Host ID is the portion of an IPv4 address that uniquely identifies a device on a given IPv4 network. Host IDs are assigned to individual devices, both hosts or endpoints and intermediary devices.
Here is a practical example of an IPv4 address.
A subnet mask is a 32-bit number that describes which portion of an IPv4 address refers to the network ID and which part refers to the host ID.
The subnet mask is configured on a device along with the IPv4 address. If a subnet mask has a binary 1 in a bit position, the corresponding bit in the address is part of the network ID.
If a subnet mask has a binary 0 in a bit position, the corresponding bit in the address is part of the host ID.
The figure represents an IPv4 address separated into a network and a host part. The prefix /16 is a way of expressing the subnet mask and it matches the number of network bits that are set to binary 1 in the subnet mask.
Public and Private IP addresses
As the internet began to grow exponentially in the 1990s, it became clear that if the current growth trajectory continued, eventually, there would not be enough IPv4 addresses for everyone who wanted one.
Work began on a permanent solution, which would become IPv6, but several other solutions were developed in the interim.
Hosts that are publicly accessible over the internet require public IP addresses. The Internet Assigned Numbers Authority (IANA) carefully manages the remaining supply of IPv4 addresses to ensure that duplication of publicly used addresses does not occur. Figure 4 illustrates the available public ranges.
Private IPv4 addresses are used within a single premises (your home for example). As they are not publicly reachable, they can be reused at different premises (your friend’s computer can have the same private IP address as you).
When a network that uses private addresses must connect to the internet, private addresses must be translated to public addresses.
This translation process is called Network Address Translation (NAT). A router is often the network device that performs NAT. The private address range is displayed below.
IP addresses allow the internet (which is just loads of routers and millions of interconnected hosts) to function as your data travels based on source and destination addresses.
In simple terms, if data needs to get from a host at the left to a host at the right (refer to Figure 6), it goes like this. “Hey, Router 1 (R1), I need to forward data”, *R1 receives it* “Ok, based on the destination address, I’ll point it to R2” *R2 receives it* “Ok, based on the destination address, I’ll point it to R3”. R3 then does the final delivery.
The reverse happens when a response is sent (right to left).
A quick peek into the future introduces the concept of IPv6 (version 6) addresses, the main difference to version 4 being its length (v4 is 32 bits and v6 is 128 bits).
The increase in length means a considerable rise in available address, to be exact 340 trillion trillion trillion addresses. Figure 7 visualises an IPv6 address structure.
Regional Internet Registries: RIRs manage, distribute, and register Internet number resources.
Phew! We’ve made it. You’ve been taken on a journey to explore how IP addresses function. We began with a definition and description of an IP address, then we unpacked how binary operates, then we looked at how addresses are structured.
Following this, we got a little more practical and examined the differences between public and private addresses, how data is forwarded on the internet and last but not least, the future IP address (aka IPv6).
If you’ve made it this far, here’s a surprise! Want your learning to come to life? Search Google for “what’s my IP address” to view your public IP address.