Friday, April 20, 2012

IPv4 addresses don't use dotted decimal but encode the IPv4 address into hexadecimal.



IPv6 addresses are unique from IPv4 addresses in far extra ways than just their length. The "shorthand" for writing them is unique, they've considerably unique formats, and their functional organization is unique. This section introduces you to those differences.

Address Representation

You absolutely already know that 32-bit IPv4 addresses are represented by breaking them into 4 8-bit segments and writing every single of those segments in decimal amongst 0 and 255, separating them with periods; therefore the term dotted decimal.

128-bit IPv6 test addresses are represented by breaking them up into eight 16-bit segments. Every segment is written in hexadecimal amongst 0x0000 and 0xFFFF, separated by colons. An instance of a written IPv6 address is

3ffe:1944:0100:000a:0000:00bc:2500:0d0b

Remembering extra than a handful of such addresses is practically impossible, and writing them just isn't substantially entertaining either. Fortunately, you will find two rules for minimizing the size of written IPv6 addresses. The initial rule is

The top zeroes in any 16-bit segment usually do not need to be written; if any 16-bit segment has fewer than 4 hexadecimal digits, it truly is assumed that the missing digits are top zeroes.

In the instance address, the third, fourth, fifth, sixth, and eighth segments have top zeroes. Employing the first address compression rule, the address may be written as

3ffe:1944:100:a:0:bc:2500:d0b

Notice that only top zeroes may be omitted; trailing zeroes cannot, mainly because carrying out so would make the segment ambiguous. You'd not be capable of tell no matter whether the missing zeroes belonged ahead of or immediately after the written digits.

Notice also that the fifth segment within the instance address is all zeroes, and is written having a single zero. Numerous IPv6 addresses have lengthy strings of zeroes in them. Take, as an example, the following address:

ff02:0000:0000:0000:0000:0000:0000:0005

This address may be decreased as follows:

ff02:0:0:0:0:0:0:five

Nonetheless, utilizing the second rule can minimize this address even further:

Any single, contiguous string of one particular or extra 16-bit segments consisting of all zeroes may be represented having a double colon.

Employing this rule, the instance address may be represented as the following:

ff02::five

The elevated convenience in writing such an address is apparent. But notice that the rule says only a single contiguous string of all-zero segments may be represented having a double colon. Employing the double colon extra than once in an IPv6 address can create ambiguity. Take, as an example, the following address:

2001:0d02:0000:0000:0014:0000:0000:0095

Either from the following reductions from the address is appropriate simply because they use a double colon only once:

2001:d02::14:0:0:95
2001:d02:0:0:14::95

However the following reduction is illegal mainly because it utilizes the double colon twice:

2001:d02::14::95

It is actually illegal since the length from the two all-zero strings is ambiguous; it could represent any from the following IPv6 addresses:

2001:0d02:0000:0000:0014:0000:0000:0095
2001:0d02:0000:0000:0000:0014:0000:0095
2001:0d02:0000:0014:0000:0000:0000:0095

Unlike IPv4, in which the prefixthe network portion from the addresscan be identified by a dotted decimal or hexadecimal address mask or perhaps a bitcount, IPv6 prefixes are usually identified by bitcount. That is, the address is followed by a forward slash as well as a decimal number indicating how several from the initial bits from the address are the prefix bits. As an example, the prefix from the following address will be the initial 64 bits:

3ffe:1944:100:a::bc:2500:d0b/64

When you're writing just an IPv6 prefix, you set all the host bits to 0 the exact same way you do with IPv4 addresses. As an example

3ffe:1944:100:a::/64

An IPv6 address consisting of all zeroes may be written simply having a double colon. You can find two cases where an all-zeroes address is used. The initial is a default address, discussed in Chapter 12, "Default Routes and On-Demand Routing," in which the address is all zeroes plus the prefix length is zero:

::/0

The second all-zeroes IPv6 address is an unspecified address, which is used in some Neighbor Discovery Protocol procedures described later in this chapter. An unspecified address is a filler, indicating the absence of a actual IPv6 address. When writing an unspecified address, it truly is differentiated from a default address by its prefix length:

::/128

IPv6 Address Sorts

The 3 kinds of IPv6 address follow:

Unicast
Anycast
Multicast

Unlike IPv4, there's no IPv6 broadcast address. There's, however, an "all nodes" multicast address, which serves essentially the exact same purpose as a broadcast address.

International Unicast Addresses

A unicast address is an address that identifies a single device. A global unicast address is a unicast address which is globally distinctive. The general format from the IPv6 unicast address is shown in Figure 2-1. This format, specified in RFC 3587, obsoletes and simplifies an earlier format that divided the IPv6 unicast address into Best Level Aggregator (TLA), Next-Level Aggregator (NLA), and also other fields. Nonetheless, you should be conscious that this obsolescence is comparatively recent and you happen to be most likely to encounter some books and documents that show the old IPv6 address format.

Figure 2-1. The IPv6 general unicast address format.

image

The host portion from the address is known as the Interface ID. The cause for this name is that a host can have extra than one particular IPv6 interface, and so the address extra properly identifies an interface on a host than a host itself. But that subtlety only goes so far: A single interface can have numerous IPv6 addresses, and can have an IPv4 address moreover, in which case the Interface ID is only one particular of that interface's various identifiers.

Perhaps the most striking difference amongst IPv4 addresses and IPv6 addresses, apart from their lengths, will be the location from the Subnet Identifier as a part from the network portion from the address rather than the host portion. A legacy from the IPv4 address class architecture is that the subnet portion of an IPv4 address is taken from the host portion from the address. Consequently, the host portion from the IPv4 address varies not merely with its class, but in addition together with the number of bits you use for subnet identification.

The immediate benefit of creating the IPv6 Subnet ID field a part from the network portion from the address is that the Interface ID could be a constant size for all IPv6 addresses, simplifying the parsing from the address. And creating the Subnet ID a part from the network portion creates a clear separation of functions: The network portion delivers the location of a device down towards the particular information link plus the host portion delivers the identity from the device on the information link.

The Interface ID from the global IPv6 address is, with incredibly handful of exceptions, 64 bits lengthy. Also with incredibly handful of exceptions, the Subnet ID field is 16 bits (Figure 2-2). A 16-bit Subnet ID field delivers for 65,536 separate subnets; it appears that utilizing a fixed Subnet ID size like this, when in most cases the capacity won't be nearly completely used, is wasteful. But given the general size from the IPv6 address space, and given the advantages of effortless address assignment, design, management, and parsing that comes from utilizing a fixed size, the waste is justified.

Figure 2-2. The normal field sizes from the global unicast IPv6 address.

image

The IANA plus the Regional Net Registries (RIRs)2 assign IPv6 prefixesnormally /32 or /35 in lengthto the Neighborhood Net Registries (LIRs). The LIRs, which are typically huge Net Service Providers, then allocate longer prefixes to their clients. In the majority of cases, the prefixes assigned by the LIRs are /48. You can find, however, as mentioned within the prior paragraph, a handful of exceptions in which the LIR may possibly assign a prefix of a unique length:

2 As of this writing you will find 5 RIRs: R©seaux IP Europ©ens (RIPE) serves Europe, the Middle East, and Central Asia; Latin American and Caribbean Net Address Registry (LACNIC) serves Central and South America plus the Caribbean; American Registry for Net Numbers (ARIN) serves North America and parts from the Caribbean; AfriNIC serves Africa; and Asia Pacific Network Details Centre serves Asia plus the Pacific Ocean nations.

If the customer is incredibly huge, a prefix shorter than /48 might be assigned.
If one particular and only one particular subnet is usually to be addressed, a /64 might be assigned.
If one particular and only one particular device is usually to be addressed, a /128 might be assigned.

Identifying IPv6 Address Sorts

The initial handful of bits from the address specify the address type. As an example, the first 3 bits of all global unicast addresses currently are 001. Consequently, recognizing the hexadecimal representations of global unicast addresses is fairly effortless: They all start off with either two or three, according to the worth from the fourth bit within the global routing prefix. So, for instance, currently allocated prefixes used by the 6Bone (the public IPv6 study network) begin with 3ffe, and IPv6 addresses currently allocated by the RIRs begin with 2001.

Binary 001 is expected to suffice for global unicast addresses for some time to come; a handful of other bit combinations are assigned to other defined address kinds, plus the majority of top bit combinations are reserved. Table 2-1 lists the currently allocated top bit combinations, plus the following subsections describe the other important IPv6 address kinds.

Table 2-1. High-order bits of IPv6 address kinds.

Address Sort

High-Order Bits (binary)

High-Order Bits (Hex)

Unspecified

00...0

::/128

Loopback

00...1

::1/128

Multicast

11111111

FF00::/8

Link-Local Unicast

1111111010

FF80::/10

Site-Local Unicast (Deprecated)

1111111011

FFC0::/10

International Unicast (Currently allocated)

001

2xxx::/4 or 3xxx::/4

Reserved (Future global unicast allocations)

Everything else

Neighborhood Unicast Addresses

When we speak of global unicast addresses, we mean an address with global scope. That is, an address which is globally distinctive and can consequently be routed globally with no modification.

IPv6 also has a link-local unicast address, which is an address whose scope is confined to a single link. Its uniqueness is assured only on one particular link, and an identical address may possibly exist on one more link, so the address just isn't routable off its link. As you are able to see in Table 2-1, the first 10 bits from the link-local unicast address are usually 1111111010 (FF80::/10).

As subsequent sections in this chapter demonstrate, link-local addresses have good utility for functions like the Neighbor Discovery Protocol that communicates only on a single link. It also allows devices which can be on links that usually do not have assigned global prefixes, or devices that usually do not yet know the global prefix assigned towards the link, to make IPv6 addresses that allow them to communicate with other devices on the link. The section "Address Autoconfiguration" shows how link-local prefixes are used in this scenario.

IPv6 originally defined a site-local unicast address moreover towards the link-local address. A site-local address is distinctive only within a given web-site; devices in other websites can use the exact same address. Thus a site-local address is routable only within the web-site to which it truly is assigned. Site-local IPv6 addresses are, then, functionally similar to private IPv4 addresses as defined in RFC 1918.

Advocates of site-local addresses cite various applications. One particular prominent application is for network operators that wish to make use of NAT, even with IPv6 addresses, to keep independence of their address architecture from that of their service providers. Site-local addresses are also crucial to various proposed IPv6 multihoming mechanisms.

Nonetheless, the IETF IPv6 Working Group determined that site-local unicast addresses introduced many difficulties. Not the least from the difficulties will be the fact that the definition of a "site" is vague and can mean unique points to unique network administrators. Another dilemma is concern over, like RFC 1918 IPv4 addresses, the administrative difficulties introduced when such addresses are mistakenly "leaked" outside of their intended web-site boundaries. Other potential problems cited include elevated complexity for applications and routers that should recognize and cope with site-local addresses. As a result of these issues, and immediately after some heated debate, the IPv6 Working Group deprecated site-local addresses in RFC 3879. An assurance has been given to those who see advantages in site-local addresses to introduce one more scheme with similar "bigger scope than link but smaller sized scope than global" advantages, but as of this writing such a replacement scheme has yet to be seen.

The initial 10 bits of site-local unicast addresses, as shown in Table 2-1, is 1111111011 (FFC0::/10).

Anycast Addresses

An anycast address represents a service rather than a device, plus the exact same address can reside on one particular or extra devices providing the exact same service. In Figure 2-3, some service is supplied by 3 servers, all advertising the service in the IPv6 address 3ffe:205:1100::15. The router, receiving ads for the address, does not know that it truly is being advertised by 3 unique devices; instead, the router assumes that it has 3 routes towards the exact same destination and chooses the lowest-cost route. In Figure 2-3 this is the route to server C having a cost of 20.

Figure 2-3. An anycast address represents a service that may possibly appear on numerous devices.

image

The benefit of anycast addresses is that a router usually routes towards the "closest" or "lowest-cost" server.3 So servers providing some frequently used service may be spread across a sizable network and targeted traffic may be localized or scoped towards the nearest server, creating targeted traffic patterns within the network extra efficient. And if one particular server becomes unavailable, the router routes towards the subsequent nearest server. In Figure 2-3, as an example, if server C becomes unavailable on account of a network or server failure, the router chooses the path to server A as the next-lowest-cost route. From the router's viewpoint, it truly is just selecting the next-best route towards the exact same destination.

3 The techniques by which a router chooses amongst numerous routes towards the exact same destination is covered in Chapter four, "Dynamic Routing Protocols.

Anycast addresses are defined by their service function only, not by format, and theoretically might be any IPv6 unicast address of any scope. Nonetheless, there's a format for reserved anycast addresses, defined in RFC 2526. Anycast addresses have already been used for some time in IPv4 networks, but are formalized in their definition in IPv6.

Multicast Addresses

A multicast address identifies not one particular device but a set of devicesa multicast group. A packet being sent to a multicast group is originated by a single device; consequently a multicast packet ordinarily has a unicast address as its source address as well as a multicast address as its destination address. A multicast address by no means appears inside a packet as a source address.

The members of a multicast group may possibly include only a single device, or perhaps all devices inside a network. The truth is, IPv6 does not possess a reserved broadcast address like IPv4, however it does possess a reserved all-nodes multicast group, which is essentially the exact same point: a multicast group to which all receiving devices belong.

Multicasting is important towards the fundamental operation of IPv6, particularly some of its plug-and-play capabilities like router discovery and address autoconfiguration. These functions are a part from the Neighbor Discovery Protocol, discussed later in this chapter.

The format from the IPv6 multicast address is shown in Figure 2-4. The initial eight bits from the address are usually all ones, plus the subsequent 4 bits are designated as flags. Currently the first 3 of these bits are unused and usually set to 0. The fourth bit indicates no matter whether the address is a permanent, well-known address (0) or an administratively assigned transient address (1). The next 4 bits indicate the scope from the address as shown in Table 2-2. Table 2-3 shows various reserved, well-known IPv6 multicast addresses, all of which are link-local scope. Mainly because a multicast group is usually a set of person nodes, there's no needor sensefor having a subnet field within the multicast address. So the last 112 bits are used as the Group-ID, identifying person multicast groups. Current usage sets the first 80 bits to 0 and just utilizes the last 32 bits.

Figure 2-4. The IPv6 multicast address format.

image

Table 2-2. Multicast address scopes.

Scope Field Value

Scope

0x0

Reserved

0x1

Node-Local

0x2

Link-Local

0x5

Site-Local

0x8

Organization Neighborhood

0xE

International

0xF

Reserved

Table 2-3. Examples of well-known IPv6 multicast addresses.

Address

Multicast Group

FF02::1

All Nodes

FF02::two

All Routers

FF02::five

OSPFv3 Routers

FF02::six

OSPFv3 Designated Routers

FF02::9

RIPng Routers

FF02::A

EIGRP Routers

FF02::B

Mobile Agents

FF02::C

DHCP Servers/Relay Agents

FF02::D

All PIM Routers

Embedded IPv4 Addresses

There are several transition technologiesmeans of helping to transition a network from IPv4 to IPv6 or otherwise support IPv4 and IPv6 to coexistthat need an IPv4 address to be communicated within an IPv6 address. The person technology specifies how the IPv4 address is usually to be embedded within the IPv6 address, plus the implementation from the technology knows where amongst the 128 bits from the IPv6 address to find the 32 bits from the IPv4 address. But you can also discover that several of these technologies have distinctive formats for their address representations that permit you to determine the embedded IPv4 address. Examples of IPv6 addresses with an embedded IPv4 address of 10.23.1.five are

FE80::5EfE:10.23.1.five (An ISATAP address)
::FFFF:10.23.1.five and ::FFFF:0:10.23.1.five (SIIT addresses)
FEC0:0:0:1::10.23.1.five (TRT address)

In every single of these examples, the IPv4 address will be the last 32 bits from the IPv6 address and is represented in dotted decimal.

Other transition technologies utilizing embedded IPv4 addresses usually do not use dotted decimal but encode the IPv4 address into hexadecimal. 6to4, as an example, does this. 10.23.1.five in hexadecimal is 0A17:0105. A 6to4 prefix with 10.23.1.five embedded is then

2002:0A17:0105::/48

Transition technologies usually are not covered in this volume, and so you happen to be not most likely to see one particular of these address representations once again in this book. They may be shown here only mainly because you happen to be most likely to encounter addresses like these should you function with IPv6.



No comments:

Post a Comment