top

Search

Software Key Tutorial

.

UpGrad

Software Key Tutorial

IPv 4 address

In the vast domain of the internet, communication between devices relies on a system of unique identifiers known as IP addresses. Among these, IPv 4 addresses play a pivotal role in facilitating the seamless exchange of information across the world wide web. In this comprehensive guide, we will delve into the intricacies of IPv 4 addressing, exploring its format, range, classes, and the reasons why it remains a vital component of our online connectivity.

What is IP?

IP, short for Internet Protocol, is a fundamental set of rules governing data communication across networks. It assigns a unique address to every device connected to the internet, enabling data packets to be sent and received accurately. An IP address acts much like a street address, allowing information to be directed to and from the correct destination.

What is my IPv4 Address?

IPv4, or Internet Protocol version 4, is the fourth iteration of the IP addressing system and remains the most widely used version on the internet. It is a 32-bit numerical address, typically expressed in a dotted-decimal format, such as 192.168.0.1. Each section of the address consists of 8 bits, ranging from 0 to 255, separated by dots. Here’s an ipv4 address example: 192.168.1.152:


Notations of an IPv4 address :


Why do we Use IPv 4 Addressing?

IPv4 addressing serves as the backbone of the internet for several compelling reasons. Firstly, its widespread adoption means that most devices and networking equipment are compatible with IPv4. Additionally, its 32-bit address space allows for approximately 4.3 billion unique addresses, which was more than sufficient in the early days of the Internet.

Ipv4 address in computer network

In a computer network, an IPv4 address is a unique numerical identifier assigned to each device connected to the network. When a device, such as a computer, smartphone, or server, connects to a network, it is assigned an IPv4 address. This address consists of a series of four numbers separated by dots, with each number ranging from 0 to 255. For example, 192.168.1.10 is a valid IPv4 address.

IPv4 addresses are used by routers and switches to route data packets from the source device to the destination device. When one device wants to send data to another device on the network, it encapsulates the data in a packet. Routers and switches then use this address information to determine the most efficient path to deliver the packet to its destination.

In local area networks (LANs), such as those within homes or offices, devices are often assigned private IPv4 addresses. These private addresses are reserved for internal use.

The most commonly used private address ranges are 192.168.0.0 to 192.168.255.255, 172.16.0.0 to 172.31.255.255, and 10.0.0.0 to 10.255.255.255.

What are the different Types of Addressing Modes?

IPv4 addresses can be classified into five different Ipv4 address classes: A, B, C, D, and E. Each class has a specific range of addresses reserved for different purposes.

  • Class A: This class is primarily used for large networks, with the first bit always set to 0. The IP address range for Class A is from 1.0.0.1 to 126.255.255.254.

  • Class B: Class B addresses are typically assigned to medium-sized networks. The first two bits of the address are set to 10, and the IP range for Class B is from 128.1.0.1 to 191.255.255.254.

  • Class C: Class C addresses are utilized for smaller networks. The first three bits are set to 110, and the IP range for Class C is from 192.0.1.1 to 223.255.254.254.

  • Class D: Class D addresses are reserved for multicast groups. The first four bits are set to 1110, and the IP range for Class D is from 224.0.0.0 to 239.255.255.255.

  • Class E: Class E addresses are reserved for experimental purposes. The first four bits are set to 1111, and the IP range for Class E is from 240.0.0.0 to 255.255.255.255.

Parts of IPv4

IPv4 addresses are divided into three main parts: the network part, the host part, and the subnet number. These parts work together to ensure efficient data routing and delivery.

  • Network Part: The network part of the IP address identifies the specific network to which a device belongs. It is determined based on the class of the IP address.

  • Host Part: The host part of the IP address identifies an individual device within a network.

  • Subnet Number: The subnet number helps divide a large network into smaller sub-networks, enhancing network efficiency.

How to find IPv4 address

For Windows:

  1. Open the Command Prompt:

  • Press the Windows key + R to open the Run dialog box.

  • Type "cmd" and press Enter, or click OK. This will open the Command Prompt.

  1. In the Command Prompt window, type the following command and press Enter:


  1. Look for the network adapter you are using (such as Ethernet or Wi-Fi) and find the "IPv4 Address" under that adapter. It will be listed as "IPv4 Address" followed by the actual IP address in the format of four sets of numbers separated by dots (e.g., 192.168.1.10).

For macOS:

  1. Open the Terminal:

  • You can find the Terminal application in the Utilities folder within the Applications folder. Alternatively, you can use Spotlight Search (Cmd + Space) and type "Terminal" to launch it.

  1. In the Terminal window, type the following command and press Enter:


  1. Look for your active network adapter (such as en0 for Ethernet or en1 for Wi-Fi) and locate the "inet" section. The IPv4 address will be displayed next to "inet" and will be in the format of four sets of numbers separated by dots (e.g., 192.168.1.10).

Linux (Ubuntu, Debian, etc.):

  1. Open the Terminal:

  • You can find the Terminal application by searching for "Terminal" in the applications menu.

  1. In the Terminal window, type the following command and press Enter:


  1. Look for your active network adapter (such as eth0 for Ethernet or wlan0 for Wi-Fi) and find the "inet" section. The IPv4 address will be displayed next to "inet" and will be in the format of four sets of numbers separated by dots (e.g., 192.168.1.10).

Please note that the IPv4 address displayed may vary depending on your network configuration. If you are behind a router or using a private network, your public IP address may differ from the one assigned to your device on the local network.

Characteristics of IPv4

  • Universal Connectivity: IPv4 addresses allow devices worldwide to connect and communicate seamlessly over the internet.

  • Address Format: The dotted-decimal format makes IPv4 addresses easy to read and interpret.

  • Public and Private Addresses: IPv4 addresses can be public, which are globally routable, or private, which are used within local networks.

  • Scalability: While IPv4 provided enough addresses in the early days of the internet, the exponential growth of connected devices has led to the exhaustion of available addresses.

Advantages of IPv4

  • Simplicity: IPv4 addresses are easy to understand and configure, making them accessible to users of all levels.

  • Compatibility: The vast majority of networking equipment and devices support IPv4, ensuring seamless connectivity.

  • Proven Technology: IPv4 has a long history of successful implementation, making it a reliable and stable choice for many applications.

Limitations of IPv4

  • Limited Address Space: IPv4's 32-bit address format results in a finite number of available addresses, leading to address exhaustion.

  • NAT (Network Address Translation): To cope with address shortages, Network Address Translation is used, which introduces complexities and limitations in some applications.

  • Security and QoS Challenges: IPv4's limited address space and increasing demand for security and quality of service features pose challenges in modern networking environments.

What is IPv6?

Recognizing the impending depletion of IPv4 addresses, IPv6 (Internet Protocol version 6) was developed to overcome the limitations of its predecessor. IPv6 uses a 128-bit address format, offering an almost unfathomable number of unique addresses (approximately 340 undecillion!).

The Ipv4 address format

IPv6 addresses are expressed in a hexadecimal format, consisting of eight groups of four hexadecimal digits, separated by colons, for example, 

2001:0db8:85a3:0000:0000:8a2e:0370:7334.

Ipv4 address range

The IPv4 address range refers to the set of all possible IP addresses that can be assigned within the IPv4 addressing system. IPv4 addresses are 32-bit numbers, and they are divided into four octets, each represented by eight bits, separated by dots. The range of IPv4 addresses spans from 0.0.0.0 to 255.255.255.255.

However, not all addresses within this range are available for public use. The Internet Assigned Numbers Authority (IANA) has reserved certain address blocks for specific purposes. The main reserved address blocks are:

Private Address Space:

  • 10.0.0.0 to 10.255.255.255

  • 172.16.0.0 to 172.31.255.255

  • 192.168.0.0 to 192.168.255.255

Loopback Address:

  • 127.0.0.0 to 127.255.255.255

Link-Local Address (Automatic Private IP Addressing - APIPA):

  • 169.254.0.0 to 169.254.255.255

Reserved Addresses:

  • 0.0.0.0 (reserved as the default route)

  • 255.255.255.255 (limited broadcast address)

  • 224.0.0.0 to 239.255.255.255 (reserved for multicast addresses)

These reserved address blocks serve specific purposes, such as private network usage, loopback for testing purposes, automatic IP addressing when DHCP is not available, and multicast communication.

The remaining addresses within the range are public IP addresses allocated to organizations and devices connected to the global internet. 

Differences between IPv4 and IPv6

IPv6 brings significant improvements over IPv4, addressing its limitations and offering enhanced features:

  • Address Space: IPv6's 128-bit address space provides a virtually inexhaustible number of unique addresses, ensuring we won't face address shortages in the future.

  • Simplified Header Format: IPv6 headers are more straightforward, resulting in faster routing and processing.

  • Autoconfiguration: IPv6 allows devices to configure their own addresses automatically, simplifying network setup.

Conclusion

IPv4 addresses have been the backbone of the internet for many years, facilitating the communication between devices that we often take for granted. However, with the exponential growth of connected devices, the limitations of IPv4 have become apparent. IPv6 emerges as the solution to address these shortcomings.

As the transition from IPv4 to IPv6 continues, understanding the principles of both protocols becomes increasingly crucial for the future of the internet and its seamless connectivity.

FAQs

  1. What happens if all the IPv4 addresses are exhausted?

The depletion of available IPv4 addresses is a significant concern for the internet's continued growth. The internet community has been gradually transitioning to IPv6 to address this issue, which offers a vastly larger address space. IPv6 adoption allows for an almost unlimited number of unique IP addresses, ensuring the continued expansion of the internet and accommodating the increasing number of internet-connected devices.

  1. How does the transition from IPv4 to IPv6 work?

The transition from IPv4 to IPv6 is an ongoing process that involves coexistence and migration strategies. Many networks now support IPv4 and IPv6 simultaneously, allowing devices to communicate using either protocol. Dual-stack devices can handle IPv4 and IPv6 traffic, and dual-stack routers enable communication between IPv4 and IPv6 networks. 

  1. How do ISPs assign public IPv4 addresses to their customers?

Internet Service Providers (ISPs) typically use Dynamic Host Configuration Protocol (DHCP) to assign public IPv4 addresses to their customers. With DHCP, the ISP's server dynamically allocates IP addresses from a pool of available addresses. Customers' routers or modems request an IP address, and the ISP's DHCP server responds with an available public IP address. This allows the ISP to manage its limited pool of public IPv4 addresses efficiently.

Leave a Reply

Your email address will not be published. Required fields are marked *