Ipv4 Article Index for
Ipv4
Articles about
Ipv4
 

Information About

Ipv4




IPv4 is version 4 of the Internet Protocol (IP) and it is the first version of the Internet Protocol to be widely deployed.
IPv4 is the dominant Network Layer protocol on the Internet and when ignoring its successor — IPv6 — it is the only protocol used on the Internet .

It is described in IETF RFC 791 (September 1981) which obsoleted RFC 760 (January 1980). The United States Department Of Defense also standardized it as MIL-STD-1777.

IPv4 is a data-oriented protocol to be used on a Packet Switched Internetwork (e.g., Ethernet ). It is a Best Effort protocol in that it doesn't guarantee delivery. It doesn't make any guarantees on the correctness of the data; it may result in duplicated packets and/or packets out-of-order. All of these things are addressed by an Upper Layer Protocol (e.g., TCP , UDP ).

The entire purpose of IP is to provide unique global computer addressing to ensure that two computers over the internet can uniquely identify one another.


ADDRESSING


IPv4 uses 32- Bit (4- Byte ) addresses, which limits the Address Space to 4,294,967,296 possible unique addresses.
However, many are reserved for special purposes such as Private Network s (~18 million addresses) or Multicast addresses (~1 million addresses). This reduces the number of addresses that can be allocated as public Internet addresses and as the number of addresses available is consumed, an IPv4 Address Shortage appears to be inevitable in the long run.

This limitation has helped stimulate the push towards IPv6 , which is currently in the early stages of deployment and is currently the only contender to replace IPv4.


Address representations

When writing IPv4 addresses in strings the most common notation is the Dot-decimal Notation . There are other notations based on the values of the Octet s of the IP address.

For example, the IPv4 address for www.wikipedia.org is 207.142.131.235 in the dot-decimal notation which comprises four octets in Decimal separated by periods. This is the base format used in the conversion in the following table:

All/most of these formats should work in all browsers.
Additionally, in dotted format, each octet can be of the different bases.
For example, 207.0x8E.0203.235 is a valid (though unconventional) equivalent to the above addresses.

A final form is not really a notation since it is rarely written in an ASCII string notation. That form is a binary form of the hexadecimal notation in binary. This difference is merely the representational difference between the string "0xCF8E83EB" and the 32-bit integer value 0xCF8E83EB. This form is used in both the source and destination fields.


Allocation

Originally, the IP address was divided into two parts:
  • network number – first octet

  • rest – last three octets


This created an upper limit of 256 networks and led to the creation of Classful Network s.
Under classful networking, 5 classes were created (A, B, C, D, & E) with 3 created (A, B, & C) with different lengths of network number and rest fields to change the number of IPs in each range: few networks with lots of addresses and numerous networks with only a few addresses.
Class D was for Multicast addresses and class E is reserved.

Around 1993 , the classful networks were replaced with a Classless Inter-Domain Routing (CIDR) scheme.
CIDR's primary advantage is to allow subdivision of networks to let entities sub-allocate IPs (e.g., an ISP to a customer).

The actual assignment of an address is not arbitrary.
The fundamental principle of Routing is that address encodes information about a device's location within a network.
This implies that an address assigned to one part of a network will not function in another part of the network.
A hierarchical structure, created by CIDR and overseen by the Internet Assigned Numbers Authority (IANA) and its Regional Internet Registries (RIRs), manages the assignment of Internet address worldwide.
Each RIR maintains a publicly searchable WHOIS database that provides information about IP address assignments; information from these databases plays a central role in numerous tools that attempt to locate IP addresses geographically.


Private networks

Of the 4+ billion addresses allowed in IPv4, three ranges of address are reserved for Private Network ing use only.
These ranges are not routable outside of private network and private machines cannot directly communicate with public networks.
They can, however, do so through Network Address Translation .

The following are the three ranges reserved for private networks:


Localhost

See Also: localhost



In addition to private networking, the IP range 127.0.0.0 – 127.255.255.255 (or 127.0.0.0/8 in CIDR notation) is reserved for Localhost communication.
Any address within this range should never appear on an actual network and any packet sent to this address should loop back as an incoming packet to the same machine.


Resolving

See Also: Domain Name System



The Internet is most publicly known not by IP addresses but by names (e.g., www.wikipedia.org, www.whitehouse.gov).
The routing of IP packets across the Internet is oblivious to such names.
This requires translating (or resolving) names to IP address.

The Domain Name System (DNS) provides such a system to convert names to IP address(es) and IP addresses to names.
Much like CIDR addressing, the DNS naming is also hierarchical and allows for subdelegation of name spaces to other DNS servers.


Exhaustion

A concern that has spanned decades to the 1980s is the exhaustion of available IP addresses.
This was the driving factor in Classful Network s and then later in the creation of CIDR addressing.

Today, there are several driving forces to the next address allocation solution:

The most visible solution is to migrate to IPv6 since the address size jumps dramatically from 32-bit to 128-bit which would allow about 18 Quintillion people their own set of 18 quintillion addresses (3.4e38 total addresses). However, migration has proved to be a challenge in itself, and total Internet adoption of IPv6 is unlikely to occur for many years.

Some things that can be done to mitigate the IPv4 address exhaustion are (not mutually exclusive):

As Of 2004 , predictions for the exhaustion of the IPv4 address space range from 2016 (for unallocated pool exhaustion) to 2023 (for complete exhaustion of the address space).
Historically, though, forward predictions for the date of address exhaustion have been unreliable; predictions from the late 1980s have not been borne out in practice.


NETWORK ADDRESS TRANSLATION

See Also: Network address translation



One method to increase both address utilization and security is to use Network Address Translation (NAT).
By assigning one IP to a public machine as an Internet Gateway and using a Private Network for an organization's computers allows for considerable address savings.
This also increases security by making all of the computers on a private network not directly accessible to the public network.


VIRTUAL PRIVATE NETWORKS

See Also: Virtual private network



Since private address ranges are deliberately ignored by all public routers, it is not normally possible to connect two private networks (e.g., two branch offices) via the public Internet. Virtual Private Network s (VPNs) solve this problem.

VPNs work by inserting an IP packet (encapsulated packet) directly into the data field of another IP packet (encapsulating packet) and using a publicly routable address in the encapsulating packet. Once the VPN packet is routed across the public network and reaches the endpoint, the encapsulated packet is extracted and then transmitted on the private network just as if the two private networks were directly connected.

Optionally, the encapsulated packet can be encrypted to secure the data while over the public network (see VPN article for more details).


ADDRESS RESOLUTION PROTOCOL

See Also: Address Resolution Protocol



Since IP is an upper layer protocol to the Data Link Layer there arises a problem of when a computer with IP address A wants to communicate with IP address B.
In order to send a packet from A to B then A needs to know the hardware address of B.
This discover is done through Address Resolution Protocol (ARP).


REVERSE ADDRESS RESOLUTION PROTOCOL/DHCP


Unlike the situation outlined for ARP, the case arises when a computer knows its Data Link Layer address but not its IP address.
This is a common scenario in Private Network s and Digital Subscriber Line (DSL) connections when the IP address of the machines are irrelevant.
This is usually the case for Work Station s but not Servers .

RARP is an obsoleted method for answering this question: This is my hardware address, what is my IP address?
RARP was replaced by BOOTP which, in turn, was replaced by Dynamic Host Configuration Protocol (DHCP).

In addition to sending the IP address, DHCP can also send the NTP server, DNS servers, and more.


PACKET STRUCTURE

An IP packet consists of two sections:
  • header

  • data



Header

The header consists of 13 fields, of which only 12 are required. The 13th field is optional (red background in table) and aptly named: options. The fields in the header are packed with the most significant byte first ( Big Endian ), and for the diagram and discussion, the most significant bits are considered to come first. The most significant bit is numbered 0, so the version field is actually found in the 4 most significant bits of the first byte, for example.

  { Class "wikitable"
  { Class "wikitable"