What is IPv4?IPv4 stands for Internet Protocol Version 4. It is the fourth version of the Internet Protocol (IP) used to identify and locate devices on a network. It employs a 32-bit address scheme allowing up to around 4 billion addresses. Each IPv4 address is unique, helping devices to communicate effectively on a network.
(https://ccnadesdecero.es/wp-content/uploads/2019/12/Qu%C3%A9-es-IPv4.jpg)
Structure of an IPv4 Address:- An IPv4 address consists of four sets of numbers separated by periods (also known as "dots").
- Each set can range from 0 to 255.
- Example: 192.168.1.1
Classes of IPv4:- Class A: Supports 16 million hosts on each of 128 networks.
- Class B: Supports 65,000 hosts on each of 16,000 networks.
- Class C: Supports 254 hosts on each of 2 million networks.
- Class D: Reserved for multicast groups.
- Class E: Reserved for future use, or Research and Development Purposes.
Private and Public IPv4 Addresses:- Public IP addresses: These are used on the internet and are assigned by the Internet Assigned Numbers Authority (IANA).
- Private IP addresses: These are used in private networks such as home, office, and enterprise networks. These IP addresses are not routable on the internet.
IPv4 Exhaustion:The rapid increase in internet-connected devices has resulted in the exhaustion of available IPv4 address spaces. This has led to the use of techniques like NAT (Network Address Translation) as a temporary solution and the development and deployment of IPv6, which provides a significantly larger pool of IP addresses.
Subnetting in IPv4:Subnetting is a technique that divides a network into two or more smaller network segments, also known as subnets. This improves network management and efficiency. For example, 192.168.1.0/24 shows that the first 24 bits are the network part of the address, and the remaining 8 bits are used for host addresses within the network.
CIDR – Classless Inter-Domain Routing:Classless Inter-Domain Routing (CIDR) is a method for allocating IP addresses and routing Internet Protocol packets. CIDR replaced the previous system based on classes A, B, and C. A CIDR IP address looks like a normal IP address except that it ends with a slash followed by a number, called the IP network prefix. CIDR addresses reduce the size of routing tables and make more IP addresses available.
Use of IPv4 in DNS:The Domain Name System (DNS) uses IPv4 addresses to translate domain names into IP addresses. This allows the users to access a website using a familiar name, like www.openai.com, instead of an IP address.
Here's a small breakdown of common IPv4-related terms:
- TCP/IP: A suite of communication protocols used to interconnect network devices on the internet. IPv4 is a part of this suite.
- ICMP: Internet Control Message Protocol, used by network devices to send error messages and operational information.
- ARP: Address Resolution Protocol, used to map an IP address to a physical (MAC) address on the local network.
- DHCP: Dynamic Host Configuration Protocol, used to automatically assign IP addresses and other network configuration information to devices.
IPv4 vs. IPv6:IPv4 addresses are 32-bit while IPv6 addresses are 128-bit. This means IPv6 provides a substantially larger number of available addresses than IPv4. However, despite the increased availability of addresses in IPv6, IPv4 is still widely used due to the complexity involved in migrating networks and infrastructure to IPv6.
Address Resolution Protocol (ARP):ARP is a protocol used to map an IP address to a physical address on the network, known as a MAC address. For example, when a machine on a network wants to send something to another machine it will broadcast an ARP request containing the IP address of the intended recipient. All machines on the network can see this request, but only the machine with the matching IP address will respond with its MAC address.
Internet Control Message Protocol (ICMP):The ICMP is a supporting protocol that sends error reporting messages for conditions such as "Destination Unreachable," "Source Quench," or "Redirect,". It is also used for ICMP Echo Request and Echo Reply messages (commonly known as PING).
Dynamic Host Configuration Protocol (DHCP):The DHCP allows a server to dynamically distribute IP addressing and configuration information to clients. It automates the assignment, tracking, and reclamation of IP addresses and allows a host to obtain or renew its IP configuration information from a DHCP server.
Network Address Translation (NAT):Network Address Translation (NAT) is a process where a network device, such as a firewall, assigns a public IP address to a computer (or group of computers) inside a private network. The main use of NAT is to limit the number of public IP addresses an organization or company must use, for both economy and security purposes.
Common IPv4 Related Protocols:
- FTP (File Transfer Protocol): Used for transferring computer files between a client and server in a network.
- HTTP (Hypertext Transfer Protocol): Is the foundation of any data exchange on the Web and it is a protocol used for transmitting hypertext via the internet.
- HTTPS (Hypertext Transfer Protocol Secure): An extension of the HTTP that is used for secure communication over a computer network, and is widely used on the Internet.
- SMTP (Simple Mail Transfer Protocol): Is the protocol used for sending e-mail messages between servers.
- POP (Post Office Protocol): Is an Internet standard protocol used by local e-mail clients to retrieve e-mail from a remote server over a TCP/IP connection.
- IMAP (Internet Message Access Protocol): Is an Internet standard protocol used by email clients to retrieve messages from a mail server over a TCP/IP connection.
IPv4 Header Structure:The IPv4 protocol data unit is the IP packet which comprising an IP header and a payload. The header contains information required for routing and delivery. It has a fixed part of 20 bytes plus an optional part of up to 40 bytes.
Private and Public IP addresses:Public addresses are assigned by the Internet Assigned Numbers Authority (IANA) and are routable on the Internet. On the other hand, private addresses are used in private networks and are not routable on the Internet. The ranges reserved for private addresses are: 10.0.0.0 – 10.255.255.255 (10.0.0.0/8), 172.16.0.0 – 172.31.255.255 (172.16.0.0/12), and 192.168.0.0 – 192.168.255.255 (192.168.0.0/16).
IP Fragmentation:IP fragmentation is an Internet Protocol (IP) process that breaks packets into smaller pieces (fragments) so that they can pass through a link with a smaller maximum transmission unit (MTU) than the original packet size. The fragments are reassembled by the receiving host.
Common terms in IPv4:
- Unicast: An addressing method where datagrams are sent from one host to another host directly.
- Broadcast: An addressing method where datagrams are sent from one host to all hosts in the network.
- Multicast: An addressing method where datagrams are sent from one host to multiple hosts that constitute a multicast group.
- Loopback: The IP address 127.0.0.1 is reserved for loopback. This means that if a host sends a datagram with this address, the datagram will be looped back to the same host.
Limitations of IPv4:The most prominent limitation of the IPv4 protocol is its address space. Since the addresses are 32-bit, it allows for a maximum of about 4.3 billion unique addresses, and this total supply has already been exhausted. This has necessitated the adoption of various strategies for more efficient use of addresses, like CIDR and NAT, and is the main motivation for the development and deployment of the newer IPv6, which has a vastly larger address space. IPv4 also lacks some modern security features that are built into IPv6.