Chapter 2. The Internet Address Architecture


This chapter deals with the structure of network-layer addresses used in the Internet, the IP addresses. [p31-32]

Expressing IP Addresses

In IPv4, the dotted-quad notation for IPv4 addresses consists of four decimal numbers separated by periods. For example, Each such number is a nonnegative integer in the range [0, 255] and represents one-quarter of the entire IP address. It is simply a way of writing the whole IPv4 address ( a 32-bit nonnegative integer used throughout the Internet system) using convenient decimal numbers. [p32]

In IPv6, addresses are 128 bits in length, four times larger than IPv4 addresses. The conventional notation for IPv6 addresses is a series of four hexadecimal ("hex" or base-16) numbers called blocks or fields separated by colons. For example, an IPv6 address containing eight blocks would be written as 5f05:2000:80ad:5800:0058:0800:2023:1d71. In addition, a number of agreed-upon simplifications have been standardized for expressing IPv6 addresses:

  1. Leading zeros of a block need not be written. In the preceding example, the address could have been written as 5f05:2000:80ad:5800:58:800:2023:1d71.
  2. Blocks of all zeros can be omitted and replaced by the notation ::.
    • For example, the IPv6 address 0:0:0:0:0:0:0:1 can be written more compactly as ::1.
    • Similarly, the address 2001:0db8:0:0:0:0:0:2 can be written more compactly as 2001:db8::2.
    • To avoid ambiguities, the :: notation may be used only once in an IPv6 address
  3. IPv4-mapped IPv6 address. The block immediately preceding the IPv4 portion of the address has the value ffff and the remaining part of the address is formatted using dotted-quad. For example, the IPv6 address ::ffff: represents the IPv4 address This is called an IPv4-mapped IPv6 address.
  4. IPv4-compatible IPv6 address. The low-order 32 bits of the IPv6 address can be written using dotted-quad notation. The IPv6 address ::0102:f001 is therefore equivalent to the address ::

The colon delimiter in an IPv6 address may be confused with another separator such as the colon used between an IP address and a port number. In such circumstances, bracket characters, [ and ], are used to surround the IPv6 address. The following URL is an example:


The flexibility provided by [RFC4291] resulted in unnecessary confusion due to the ability to represent the same IPv6 address in multiple ways. To remedy this situation, [RFC5952] imposes some rules to narrow the range of options while remaining compatible with [RFC4291]. They are as follows:

  1. Leading zeros must be suppressed (e.g., 2001:0db8::0022 becomes 2001:db8::22).
  2. The :: construct must be used to its maximum possible effect (most zeros suppressed) but not for only 16-bit blocks. If multiple blocks contain equallength runs of zeros, the first is replaced with ::.
  3. The hexadecimal digits a through f should be represented in lowercase.

Basic IP Address Structure

IPv4 has 232 possible addresses and IPv6 has 2128.

Classful Addressing

Subnet Addressing

Subnet Masks

Variable-Length Subnet Masks (VLSM)

Broadcast Addresses

IPv6 Addresses and Interface Identifiers

CIDR and Aggregation



Special-Use Addresses

Addressing IPv4/IPv6 Translators

Multicast Addresses

IPv4 Multicast Addresses

IPv6 Multicast Addresses

Anycast Addresses

An anycast address is a unicast IPv4 or IPv6 address that identifies a different host depending on where in the network it is used. This is accomplished by configuring Internet routers to advertise the same unicast routes from multiple locations in the Internet. Thus, an anycast address refers not to a single host in the Internet, but to the "most appropriate" or "closest" single host that is responding to the anycast address.

Anycast addressing is used most frequently for finding a computer that provides a common service. For example, a datagram sent to an anycast address could be used to find a DNS server (Chapter 11), a 6to4 gateway that encapsulates IPv6 traffic in IPv4 tunnels, or RPs for multicast routing.




Unicast Address Assignment

Single Provider/No Network/Single Address

Single Provider/Single Network/Single Address

Single Provider/Multiple Networks/Multiple Addresses

Multiple Providers/Multiple Networks/Multiple Addresses (Multihoming)

Attacks Involving IP Addresses