- Trending Categories
- Data Structure
- Operating System
- MS Excel
- C Programming
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Structure and Types of IP Address
The Internet has become an integral part of our lives, and we rely on it for communication, entertainment, and information. Every device that connects to the internet requires an IP address.
An IP (Internet Protocol) address is a unique numerical identifier assigned to every device connected to a network that uses the Internet Protocol for communication. In this article, we will explore the structure and types of IP addresses used in networks today.
An IP address is a unique numerical identifier assigned to every device connected to a network that uses the Internet Protocol. It consists of four numbers separated by periods (dots), such as 192.168.0.1. Each number can range from 0 to 255, giving us over 4 billion possible combinations.
Structure of IP Address
The structure of an IP (Internet Protocol) address refers to the way it is formatted, represented, and read. An IP address is used to identify devices on a network and allow communication between them. Each device on a network has a unique IP address that makes it possible for data packets to be sent and received effectively.
An IP address is made up of 32 bits for IPv4 or 128 bits for IPv6 that are grouped into octets separated by dots. The binary representation of an IP address shows how each bit within the address is either '0' or '1.' For example, the binary representation of an IPv4 address might look like this:
11000000 . 10101000 . 00000101 . 00000001 This binary string corresponds to the decimal representation: 192 . 168 . 5 . 1
The decimal representation of an IP address makes it easier for humans to understand and remember. It uses four numbers separated by dots where each number ranges from 0 to 255.
The numbers represent the value of each octet in decimal notation. For instance, using the same example as above, the decimal representation would be:
192 . 168 . 5 .1
IPv4 vs IPv6IPv4 (Internet Protocol version four) was first introduced in the early days of the internet and remains one of the most widely used protocols today.
However, with so many devices connected worldwide, IPv4 addresses are becoming scarce due to limitations in its structure, which can only accommodate around four billion unique addresses. IPv6 (Internet Protocol version six), on the other hand, uses longer addresses consisting of eight groups of hexadecimal digits separated by colons that can accommodate approximately three hundred forty undecillion unique addresses.
Types of IP Addresses
Internet Protocol (IP) addresses are used to identify devices on a network. There are two types of IP addresses: public and private. In addition, there is dynamic and static IP addressing.
Public IP Addresses
A Public IP address is an internet address that is assigned to any device that directly faces the Internet. It is unique and identifies the device on the internet.
It can be accessed from anywhere on the internet, making it useful for hosting websites or other services. Public IPs can be obtained from ISPs or purchased from companies that provide them.
How they are assigned
When you connect your device to the internet through an ISP, they assign you a public IP address from their pool of available addresses. This assignment process can be done either dynamically (automatic assignment) or manually (through a service request).
An example of a public IP address would be 220.127.116.11 which belongs to Google.com.
Private IP Addresses
Private IPs, also known as local IPs, are used within private networks and do not route over the Internet's backbone infrastructure like Public IPs do.
A Private IP address is a non−publicly registered internet protocol address assigned by routers in private networks like LANs (Local Area Networks), Intranets or Wi−Fi networks at home.
How they are assigned
Private IPs are usually allocated by the router through DHCP protocol automatically when devices connect to it.
Some examples of private addresses include: − 192.168.x.x − 172.x.x.x
− 10.x.x An example of a private IPv6 address would be fd7a:115c:a1e0:ab35::1
Dynamic vs Static IP Addresses
Definition and Differences between Dynamic and Static IPs
A dynamical IP address is an address that changes every time you connect to the Internet. This change happens automatically in most cases, making it hard to keep track of your device's current IP.
A static IP address, on the other hand, is an address that never changes. It is permanently assigned to a device.
Advantages and Disadvantages of each type
Static IPs are useful when setting up servers because they allow for a permanent internet address for remote access purposes. However, they can be more expensive than dynamic IPs and require manual configuration. Dynamic IPs are cheaper and require little or no configuration at all.
Subnetting and CIDR Notation
Explanation of Subnetting
Subnetting is the process of dividing a large network into smaller, more manageable subnetworks. This process has become increasingly important as the size and complexity of networks have grown over time. By breaking down a large network into smaller subnetworks, network administrators can improve performance, security, and manageability.
Subnetting is achieved by borrowing bits from the host portion of an IP address to create a separate network address. For example, if we have an IP address 192.168.1.0/24 (meaning it has a subnet mask of 255.255.255.0), we can create two subnets by borrowing one bit from the host portion of the IP address so that our new subnet mask becomes 255.255.255.128 or /25.
CIDR Notation (Classless Inter−Domain Routing)
CIDR notation is a method used to represent IP addresses and their associated subnet masks in a more compact form than traditional dotted decimal notation (e.g., 192.168.1.0/24). It was introduced in the mid−1990s as part of an effort to address the limitations of classful addressing. In CIDR notation, an IP address is followed by a slash (/) character and then a number that represents how many bits are used for the network portion of the address (e.g., 192 .168.1 .0/24).
The number after the slash represents what's known as the "prefix length" or "subnet mask length." CIDR notation allows for more flexible addressing schemes because it doesn't rely on fixed classes like A, B or C addresses but instead allows for variable−length subnet masks.
How to calculate subnets using CIDR notation
Calculating subnets using CIDR notation is relatively straightforward. First, you need to determine how many bits are allocated for the network portion of the address (i.e., the prefix length).
Next, you need to convert this prefix length to a subnet mask. For example, if we have an IP address of 192.168.1.0/24, we know that 24 bits are used for the network portion and 8 bits are used for the host portion.
To convert this prefix length to a subnet mask, we simply fill in all the network bits with "1's" and all the host bits with "0's". This gives us a subnet mask of 255.255.255.0.
Once we have our subnet mask, we can then use it to determine what our subnets are by incrementing or decrementing values in the host portion of our IP addresses depending on how many subnets and hosts per subnet were required.
In this article, we have explored the structure and types of IP addresses. We have learned that IP addresses are a fundamental component of the internet and allow devices to communicate with each other.
The structure of IP addresses includes a binary representation, decimal representation, and IPv4 vs IPv6. Additionally, we have explored the different types of IP addresses including Public and Private IPs as well as their assigned examples.
Kickstart Your Career
Get certified by completing the courseGet Started