IP Addressing is a technique used to uniquely identify and locate devices on the internet or a computer network. It helps the devices to communicate with each other by allowing data transmission between them.
This guide aims to explain the basics of IP Addressing and how it works in a computer network. It covers the different types of IP Addresses, how IP Addresses are assigned, and how IP Addresses are used to route data.
Types of IP Addresses:
There are two main types of IP Addresses: IPv4 and IPv6.
IPv4 (Internet Protocol version 4) is the most widely used IP addressing system. It uses 32-bit addresses and supports a maximum of 4.3 billion unique addresses. IPv4 addresses are typically represented in dotted decimal notation (e.g., 192.168.1.1).
IPv6 (Internet Protocol version 6) is the successor to IPv4 and provides many improvements over IPv4, including a larger address space. IPv6 uses 128-bit addresses and supports a maximum of 340 trillion, trillion, trillion unique addresses. IPv6 addresses are typically represented in hexadecimal notation (e.g., 2001:0db8:85a3:0000:0000:8a2e:0370:7334).
How IP Addresses are Assigned:
IP addresses are assigned to devices by Internet Service Providers (ISPs) or by network administrators in the case of local networks.
For example, when you connect to the internet using a broadband connection, your ISP assigns you a unique IP address that identifies your device on the internet. Similarly, when you connect to a local network, the network administrator assigns you an IP address that is unique within the network.
IP addresses can be assigned either dynamically or statically.
Dynamic IP Addresses:
Dynamic IP addresses are assigned automatically by a DHCP (Dynamic Host Configuration Protocol) server. The DHCP server assigns an IP address to a device for a specific amount of time, after which the device must request a new IP address. This type of IP address assignment is commonly used in home networks and small businesses.
Static IP Addresses:
Static IP addresses are assigned manually by a network administrator and remain the same for the lifetime of the device. This type of IP address assignment is commonly used in large businesses and organizations that need to have consistent IP addresses for their devices.
How IP Addresses are Used to Route Data:
When data is transmitted over the internet, it is broken down into small packets and sent to its destination. Each packet contains the IP address of the sender and the IP address of the recipient, as well as other information.
Routers are used to route these packets from their source to their destination. Routers use the IP addresses in the packets to determine the best path to take.
The routing process works as follows:
- A device sends a packet to a destination device.
- The packet reaches a router, which reads the destination IP address in the packet.
- The router uses its routing table to determine the best path to the destination device.
- The router forwards the packet to the next router along the path.
- The process is repeated until the packet reaches its destination device.
Classes of IP Addresses:
IPv4 addresses are divided into five classes: A, B, C, D, and E. Each class of IP addresses has a different number of bits reserved for the network address and the
host address, which determines the number of networks and the number of hosts per network that can be created using that class of IP addresses.
Class A Addresses:
Class A addresses use the first octet (8 bits) for the network address and the remaining three octets (24 bits) for the host address. This means that Class A addresses can support up to 126 different networks, each with a maximum of 16 million unique hosts. Class A addresses are typically assigned to large organizations and are represented in dotted decimal notation with a range from 126.96.36.199 to 188.8.131.52.
Class B Addresses:
Class B addresses use the first two octets (16 bits) for the network address and the remaining two octets (16 bits) for the host address. This means that Class B addresses can support up to 16,384 different networks, each with a maximum of 65,534 unique hosts. Class B addresses are typically assigned to medium-sized organizations and are represented in dotted decimal notation with a range from 184.108.40.206 to 220.127.116.11.
Class C Addresses:
Class C addresses use the first three octets (24 bits) for the network address and the remaining octet (8 bits) for the host address. This means that Class C addresses can support up to 2,097,152 different networks, each with a maximum of 254 unique hosts. Class C addresses are typically assigned to small organizations and are represented in dotted decimal notation with a range from 192.0.0.0 to 18.104.22.168.
Class D Addresses:
Class D addresses are reserved for multicast IP addresses, which are used to send data to multiple devices at the same time. Class D addresses are represented in dotted decimal notation with a range from 22.214.171.124 to 126.96.36.199.
Class E Addresses:
Class E addresses are reserved for future use and are not currently assigned to any devices. Class E addresses are represented in dotted decimal notation with a range from 240.0.0.0 to 255.255.255.255.
Private IP Addresses:
Private IP addresses are IP addresses that are reserved for use within private networks, such as home networks or corporate networks. These IP addresses are not unique on the internet, so they cannot be used to communicate directly with devices on the internet. However, they can be used to communicate with other devices on the same network.
There are three sets of private IP addresses:
- 10.0.0.0 to 10.255.255.255 (Class A)
- 172.16.0.0 to 172.31.255.255 (Class B)
- 192.168.0.0 to 192.168.255.255 (Class C)
Public IP Addresses:
Public IP addresses are IP addresses that are unique on the internet and are used to communicate with devices on the internet. Public IP addresses are assigned by ISPs and are used to identify devices on the internet.
Subnetting is a technique used to divide a large network into smaller sub-networks, or subnets. Subnetting helps to organize the network, improve security, and reduce network congestion.
In subnetting, the IP address of a network is divided into two parts: the network address and the host address. The network address is used to identify the subnet, and the host address is used to identify the individual device within the subnet.
To perform subnetting, bits from the host address
are borrowed and used to create additional network addresses. This means that each subnet has a unique network address and a smaller range of host addresses.
For example, if a Class C network has an IP address of 192.168.1.0, it can be divided into two subnets, each with its own network address. The first subnet could have a network address of 192.168.1.0/24, and the second subnet could have a network address of 192.168.2.0/24.
The subnet mask is used to determine the number of subnets and the number of hosts per subnet that can be created. The subnet mask is written in dotted decimal notation and is used in conjunction with the IP address to identify the network and host addresses.
Subnetting helps to improve network security by isolating different subnets from each other, so that if one subnet is compromised, the other subnets are not affected. It also helps to reduce network congestion by dividing the network into smaller subnets, which reduces the number of devices on each network segment.
The default gateway is the IP address of the device that acts as the gateway between a local network and the internet. The default gateway is used to route data from the local network to the internet and vice versa.
When a device wants to communicate with a device on a different network, it sends the data to the default gateway, which then forwards the data to the destination device. The default gateway is typically a router, but it can also be a computer that has two or more network interfaces.
DNS (Domain Name System):
DNS is a system that translates human-readable domain names, such as www.google.com, into IP addresses, such as 188.8.131.52. DNS servers are used to perform this translation, and they can be thought of as a directory of domain names and their corresponding IP addresses.
When a user wants to access a website, they type the domain name into their web browser, and their computer sends a request to the nearest DNS server. The DNS server then returns the IP address of the website, which is used to establish a connection with the website’s server.
DNS is an important part of the internet, as it allows users to access websites using human-readable domain names instead of IP addresses, which are difficult to remember.
Static IP Addresses:
A static IP address is a permanent IP address that is assigned to a device, such as a computer or a printer. Static IP addresses are typically used in corporate networks, where it is important to know the IP address of a device in order to communicate with it.
Static IP addresses are assigned manually, and they do not change, even if the device is turned off or restarted. This makes it easier to manage the network, as the IP addresses of devices are always the same, even if their location changes.
Dynamic IP Addresses:
A dynamic IP address is an IP address that is assigned to a device by a DHCP (Dynamic Host Configuration Protocol) server. Dynamic IP addresses are used in home networks, where it is not necessary to know the IP address of each device, as long as the devices can communicate with each other.
Dynamic IP addresses are assigned automatically, and they can change each time the device is turned off or restarted. This makes it easier to manage the network, as the IP addresses of devices do not need to be configured manually.
IPv6 is the latest version of the Internet Protocol, and it is designed to replace IPv4. IPv6 was developed to address the
shortage of IP addresses in IPv4, as well as to improve the efficiency and security of the internet.
IPv6 addresses are 128 bits long, compared to the 32-bit IPv4 addresses. This allows for a much larger number of unique addresses, which will help to avoid the IP address shortage that is expected to occur in IPv4.
One of the main differences between IPv6 and IPv4 is the format of the IP address. IPv6 addresses are written in hexadecimal notation, with colons separating each group of 16 bits. For example, a typical IPv6 address might look like this: 2001:0db8:85a3:0000:0000:8a2e:0370:7334.
Another difference between IPv6 and IPv4 is the way in which IP addresses are assigned. In IPv6, devices can be assigned a unique IP address by the stateless address autoconfiguration (SLAAC) process, which allows devices to generate their own IP addresses based on the network prefix and the device’s MAC address.
IPv6 also includes improvements in routing and security, such as support for flow labels and encryption, which are not available in IPv4.
In conclusion, IP addressing is an important part of networking, as it allows devices to communicate with each other. Understanding the basics of IP addressing, such as IP address classes, subnetting, default gateways, DNS, static and dynamic IP addresses, and IPv6, is essential for anyone who wants to work in the field of networking.