In any network, Internet Protocol (IP) addressing is needed to ensure that data is sent to the correct recipient or device. Imagine you're writing a letter (data) to a friend. When you've finished writing, you decide to enclose it in an envelope (encapsulation) with your friend's mailing address (addressing information). This is the typical procedure for sending a letter before dropping it off at the local postal office (network). Most importantly, the addressing information you've written on the envelope must be put into a particular format to ensure that the postal service company (network devices) are able to deliver it to the appropriate destination.
On a TCP/IP network, the process is similar. Each device on a network has a unique IP address (compared to a mailing address). In this chapter, we will be covering the following topics:
- Converting binary to decimal and vice versa
- Understanding IPv4 and IPv6 protocol structure
- Classes of IP addresses
- Types of transmissions in IPv4 and IPv6
- Special IP addresses
- Subnetting
- Configuring an IP address on various devices
Let's begin!
One of the many questions you may have is, who created the IP addressing scheme and how is it regulated? To provide a better insight and help you understand this, we will discuss a few governing bodies with their functions and responsibilities on the internet.
Both IP versions 4 and 6 address schemes are managed by the
Internet Assigned Numbers Authority (
IANA). They governed the uses of the
Domain Name System (
DNS) root directory services, IP versions 4 and 6, and many other internet protocols (some of which were mentioned in
Chapter 2,
Network Ports, Protocols, and Topologies). The IPv4 scheme was deployed on January 1, 1983. Most of the internet that we know today is based on the IPv4 addressing scheme and is still the predominant method of communication on both the internet and private networks. IPv6 was deployed not too long after; this occurred in 1999.
IANA has developed two separate address spaces for IPv4, and these are known as the public and the private address spaces. The public IPv4 address space, defined as RFC 1466, has approximately 4 billion public IPv4 addresses. At the time of development, 4 billion was a huge number, but with the advancement of technology, networks are growing exponentially to accommodate smart devices and other appliances that require internet access. It soon exhausted the IPv4 public address space in almost every region globally.
Whenever an Internet Service Provider (ISP) needs to obtain an address block, the ISP goes to a Regional Internet Registry (RIR). There are five RIRs globally, and each manages the IP address schemes for a different region of the world. The following are the five RIR of the world:
- African Network Information Centre (AFRINIC): Covers the continent of Africa
- Asia Pacific Network Information Centre (APNIC): Covers the regions of Asia and the Pacific
- American Registry for Internet Numbers (ARIN): Covers Canada, USA, and part of the Caribbean
- Latin American and Caribbean Internet Addresses Registry (LACNIC): Covers Latin America and part of the Caribbean
- Réseaux IP Européens Network Coordination Centre (RIPE NCC): Covers Europe, the Middle East, and Central Asia
Each RIR is assigned blocks of IP addresses for distribution to ISPs or other large organizations.
Later in this chapter, we'll dive further into the characteristics and features of IP version 6, such as its structure in comparison to an IPv4 packet, and the types of IPv6 transmissions and addresses with its subnet masks.
In this section, we will focus on IP version 4. As mentioned earlier, electronic devices are able to send and receive electrical signals. The operating systems on network devices and components are able to interrupt these signals, whether it's a high voltage such as a 1 or a low voltage such as a 0. So, why do we need to understand this piece of information? We need to understand how devices communicate on the physical layer. As we've already mentioned, it does this in the form of electrical signals. Computers and other network-related components reassemble these electrical signals into data and process them so that they create information. This information is represented as ones (1s) and zeros (0s) to the computer system, but to we humans, we may see a file such as a document, music file, video file, and so on.
These electrical signals can further be represented as an IP address. As defined by the IANA, an IPv4 address is made of 32-bits. These bits are either a 1 or a 0. For every 8-bits of numbers, there is a period or dot (.) to separate it. These 8-bits are known as an octet. Therefore, there are four octets in a single IPv4 address.