IPv4

IPv4

Internet Protocol version 4 (IPv4) is the fourth revision in the development of the Internet Protocol (IP) and it is the first version of the protocol to be widely deployed. Together with IPv6, it is at the core of standards-based internetworking methods of the Internet, and is still by far the most widely deployed Internet Layer protocol.

It is described in IETF publication RFC 791 (September 1981) which rendered obsolete 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 delivery protocol in that it does not guarantee delivery, nor does it assure proper sequencing, or avoid duplicate delivery. These aspects are addressed by an upper layer protocol (e.g. TCP, and partly by UDP). IPv4 does, however, provide data integrity protection through the use of packet checksums.

Addressing

IPv4 uses 32-bit (four-byte) addresses, which limits the address space to 4,294,967,296 (232) possible unique addresses. However, some are reserved for special purposes such as private networks (~18 million addresses) or multicast addresses (~16 million addresses). This reduces the number of addresses that can be allocated as public Internet addresses. As the number of addresses available are consumed, an IPv4 address shortage appears to be inevitable, however Network Address Translation (NAT) has significantly delayed this inevitability.

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

IPv4 addresses are usually written in dot-decimal notation, which consists of the four octets of the address expressed in decimal and separated by periods. This is the base format used in the conversion in the following table:

The ranges 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 are reserved for private networking by RFC 1918, while the 169.254.0.0/16 range is reserved for Link-Local addressing as defined in RFC 3927.

Localhost

The address range 127.0.0.0–127.255.255.255 (127.0.0.0/8 in CIDR notation) is reserved for localhost communication.Addresses within this range should never appear outside a host computer and packets sent to this address are returned as an incoming packets on the same virtual network device (known as loopback).

Addresses ending in 0 or 255

It is a common misunderstanding that addresses ending in 255 or 0 can never be assigned to hosts. This is only true of networks with subnet masks of at least 24 bits — Class C networks in the old classful addressing scheme, or in CIDR, networks with masks of "/24" to "/32" (or 255.255.255.0–255.255.255.255).

In classful addressing (now obsolete with the advent of CIDR), there are only three possible subnet masks: Class A, 255.0.0.0 or /8; Class B, 255.255.0.0 or /16; and Class C, 255.255.255.0 or /24. For example, in the subnet 192.168.5.0/255.255.255.0 (or 192.168.5.0/24) the identifier 192.168.5.0 refers to the entire subnet, so it cannot also refer to an individual device in that subnet.

A broadcast address is an address that allows information to be sent to all machines on a given subnet, rather than a specific machine. Generally, the broadcast address is found by obtaining the bit complement of the subnet mask and performing a bitwise OR operation with the network identifier. In other words, the broadcast address is the last address in the range belonging to the subnet. In our example, the broadcast address would be 192.168.5.255, so to avoid confusion this address also cannot be assigned to a host. On a Class A, B, or C subnet, the broadcast address always ends in 255.

However, this does not mean that every addresses ending in 255 cannot be used as a host address. For example, in the case of a Class B subnet 192.168.0.0/255.255.0.0 (or 192.168.0.0/16), equivalent to the address range 192.168.0.0–192.168.255.255, the broadcast address is 192.168.255.255. However, one can assign 192.168.1.255, 192.168.2.255, etc. (though this can cause confusion). Also, 192.168.0.0 is the network identifier and so cannot be assigned, but 192.168.1.0, 192.168.2.0, etc. can be assigned (though this can also cause confusion).

With the advent of CIDR, broadcast addresses do not necessarily end with 255.

In general, the first and last addresses in a subnet are used as the network identifier and broadcast address, respectively. All other addresses in the subnet can be assigned to hosts on that subnet.

Address resolution

Hosts on the Internet are usually known not by IP addresses, but by names (e.g., www.wikipedia.org, www.whitehouse.gov, www.freebsd.org, www.berkeley.edu).The routing of IP packets across the Internet is not directed by such names, but by the numeric IP addresses assigned to such domain names. This requires translating (or resolving) domain names to addresses.

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

The domain name system is often described in analogy to the telephone system directory information systems in which subscriber names are translated to telephone numbers.

Exhaustion

Since the 1980s it has been apparent that the number of available IPv4 addresses is being exhausted at a rate that was not initially anticipated in the design of the network. This was the driving factor for the introduction of classful networks, for the creation of CIDR addressing, and finally for the redesign of the Internet Protocol, based on a larger address format (IPv6).

Today, there are several driving forces for the acceleration of IPv4 address exhaustion:
* Mobile devices — laptop computers, PDAs, mobile phones
* Always-on devices — ADSL modems, cable modems
* Rapidly growing number of Internet users

The accepted and standardized solution is the migration to IPv6. The address size jumps dramatically from 32 bits to 128 bits, providing a vastly increased address space that allows improved route aggregation across the Internet and offers large subnet allocations of a minimum of 264 host addresses to end-users. Migration to IPv6 is in progress but is expected to take considerable time.

Methods to mitigate the IPv4 address exhaustion are:
* Network address translation (NAT)
* Use of private networks
* Dynamic Host Configuration Protocol (DHCP)
* Name-based virtual hosting
* Tighter control by Regional Internet Registries on the allocation of addresses to Local Internet Registries
* Network renumbering to reclaim large blocks of address space allocated in the early days of the Internet

As of April 2008, predictions of exhaustion date of the unallocated IANA pool seem to converge to between February 2010 [cite web | last=Hain | first=Tony | title=IPv4 Address Pool, quarterly generated | url=http://www.tndh.net/~tony/ietf/ipv4-pool-combined-view.pdf | accessdate=2007-07-01] and May 2011 [cite web | last=Huston | first=Geoff | title=IPv4 Address Report, daily generated | url=http://www.potaroo.net/tools/ipv4/index.html | accessdate=2007-09-30]

Network address translation

One method to increase both address utilization and security is to use network address translation (NAT).With NAT, assigning one address 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 the computers on a private network not directly accessible from the public network.

Virtual private networks

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 networks (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 it travels over the public network (see VPN article for more details).

Address Resolution Protocol

The Internet Protocol is the protocol that defines and forms the Internet at the Internet Layer of the TCP/IP model. It uses a logical addressing system. If a network node sends a data packet, which carries source and destination IP addresses, to another node, either the originating node or an intermediate router must be able to translate the destination node's logical (IP) address to its physical hardware address (MAC address).This discovery and mapping of IP addresses to hardware (MAC) addresses is accomplished through Address Resolution Protocol (ARP) messages, which are executed as a Link Layer broadcast for Ethernet.

Reverse Address Resolution Protocol/DHCP

Often the need arises that a computer knows the Link Layer address for a host, but not its IP address.This is a common scenario in private networks and Digital Subscriber Line (DSL) connections when the IP addresses of the hosts are dynamically or automatically assigned.This is usually the case for work stations but not servers.

RARP is an obsoleted method for translating the hardware address of an interface to its IP address.

RARP was generally replaced by BOOTP which, in turn, was replaced by Dynamic Host Configuration Protocol (DHCP).

In addition to assigning an IP address, DHCP can also assign other network resources, such as NTP servers, DNS servers.

Packet structure

An IP packet consists of a header section and a data section.

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 four most significant bits of the first byte, for example.

Now, let's say the MTU drops to 1,500 bytes. Each fragment will individually be split up into two more fragments each:

Indeed, the amount of data has been preserved — 1480 + 1000 + 1480 + 540 = 4500 — and the last fragment offset plus data — 3960 + 540 = 4500 — is also the total length.

Note that fragments 3 & 4 were derived from the original fragment 2. When a device must fragment the last fragment then it must set the flag for all but the last fragment it creates (fragment 4 in this case). Last fragment would be set to 0 value.

Reassembly

When a receiver detects an IP packet where either of the following is true:

* "more fragments" flag set
* "fragment offset" field is non-zero

then the receiver knows the packet is a fragment.The receiver then stores the data with the identification field, fragment offset, and the more fragments flag.When the receiver receives a fragment with the more fragments flag set to 0 then it knows the length of the original data payload since the fragment offset plus the data length is equivalent to the original data payload size.

Using the example above, when the receiver receives fragment 4 the fragment offset (495 or 3960 bytes) and the data length (540 bytes) added together yield 4500 — the original data length.

Once it has all the fragments then it can reassemble the data in proper order (by using the fragment offsets) and pass it up the stack for further processing.

ee also

* Classful network
* Classless Inter-Domain Routing
* Internet Assigned Numbers Authority
* IPv6 and IPv5
* List of assigned /8 IP address blocks
* List of IP protocol numbers
* Regional Internet Registry

References

External links

* RFC 791 — Internet Protocol
* http://www.iana.org — Internet Assigned Numbers Authority (IANA)
* http://www.networksorcery.com/enp/protocol/ip.htm — IP Header Breakdown, including specific options
* RFC 3344 — IPv4 Mobility

Address exhaustion:
* [http://www.ripe.net/rs/news/ipv4-ncc-20031030.html RIPE report on address consumption as of October 2003]
* [http://www.iana.org/assignments/ipv4-address-space Official current state of IPv4 /8 allocations, as maintained by IANA]
* [http://www.potaroo.net/tools/ipv4/index.html Dynamically generated graphs of IPv4 address consumption with predictions of exhaustion dates — Geoff Huston]
* [http://www.apnic.net/news/hot-topics/internet-gov/ip-china.html IP addressing in China and the myth of address shortage]


Wikimedia Foundation. 2010.

Игры ⚽ Поможем сделать НИР

Look at other dictionaries:

  • IPv4 — im TCP/IP‑Protokollstapel: Anwendung HTTP IMAP SMTP DNS … Transport TCP UDP Internet IPv4 Netzzugang …   Deutsch Wikipedia

  • IPv4 — Название: Internet Protocol version 4 Уровень (по модели OSI): Сетевой Семейство: TCP/IP Назначение протокола: Адресация Спецификация: RFC 791 Основные реализации (клиенты) …   Википедия

  • Ipv4 — Pile de protocoles 7 • Application 6 • Présentation 5 • Session 4 • Transport …   Wikipédia en Français

  • IPv4 — es la versión 4 del Protocolo IP (Internet Protocol). Esta fue la primera versión del protocolo que se implemento extensamente, y forma la base de Internet. IPv4 usa direcciones de 32 bits, limitándola a 4.294.967.296 direcciones únicas, muchas… …   Enciclopedia Universal

  • IPv4 —   [Abk. für Internet Protocol Version 4], IP Adresse …   Universal-Lexikon

  • Ipv4 — Dieser Artikel oder Abschnitt bedarf einer Überarbeitung. Näheres ist auf der Diskussionsseite angegeben. Hilf mit, ihn zu verbessern, und entferne anschließend diese Markierung. IPv4 im TCP/IP‑Protokollstapel: Anwendung HTTP …   Deutsch Wikipedia

  • IPv4 — Pile de protocoles 7.  Application 6.  Présentation 5.  Session 4.  Tr …   Wikipédia en Français

  • IPv4 — Este artículo trata sobre la cuarta versión del protocolo Internet Protocol (IP). Para otros usos de este término, véase IP4 (desambiguación). El Internet Protocol version 4 (IPv4) (en español: Protocolo de Internet versión 4) es la cuarta… …   Wikipedia Español

  • IPv4 mapped address — IPv4 mapped addresses constitute a special class of IPv6 addresses. This address type has its first 80 bits set to zero, the next 16 set to one, while its last 32 bits represent an IPv4 address. For example, ::ffff:c000:280 is the IPv4 mapped… …   Wikipedia

  • IPv4-compatible address — IPv4 compatible IPv6 addresses used to constitute a special class of IPv6 addresses. Such an IPv6 address has its first 96 bits set to zero, while its last 32 bits represents an IPv4 address.This address type has been deprecated by RFC 4291.The… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”