ipv6_m2_v1-2e

Embed Size (px)

Citation preview

  • 8/19/2019 ipv6_m2_v1-2e

    1/10

    IPv6 Basics, Version 1.2e © T.O.P. BusinessInteractive GmbH Page 1 of 10

    2 IPv6 Addressing

  • 8/19/2019 ipv6_m2_v1-2e

    2/10

    IPv6 Basics, Version 1.2e © T.O.P. BusinessInteractive GmbH Page 2 of 10

    2.1 IPv6 Addressing Subnet Prefix and Interface ID........................3 2.2 IPv6 Addressing Mathematics.....................................................4 2.3 IPv6 Compression Format ...........................................................5 2.4 IPv6 Address Types (1/2) .............................................................6 2.4 IPv6 Address Types (2/2) .............................................................7 2.5 IPv6 Subnetting and Global Routing...........................................8 2.6 EUI-64 INterface ID .......................................................................9 2.7 Multiple IP Addresses ................................................................10

  • 8/19/2019 ipv6_m2_v1-2e

    3/10

    IPv6 Basics, Version 1.2e © T.O.P. BusinessInteractive GmbH Page 3 of 10

    2.1 IPv6 Addressing Subnet Prefix and Interface ID

    IPv4 addresses are 32 bits long and are shown in dotted decimal notation. Four decimal

    values between 0 and 255 are separated by periods. In addition each IPv4 address has acorresponding netmask in decimal values like this. IPv6 addresses are 128 bits long and areshown in hexadecimals as a sequence of eight 16-bit values separated by colons. In IPv6 thesubnet mask is called the prefix.

    You are already familiar with the representation of a netmask with the number of bits setshown after a slash. This format is used for IPv6 addresses as well. A netmask inhexadecimals is not used in IPv6.The prefix is used to separate the Subnet Prefix“ from theInterface Id of an IPv6 address. It has the same function and works the same way as thenetwork and host part of an IPv4 address.

  • 8/19/2019 ipv6_m2_v1-2e

    4/10

    IPv6 Basics, Version 1.2e © T.O.P. BusinessInteractive GmbH Page 4 of 10

    2.2 IPv6 Addressing Mathematics

    In IPv6 we need to be familiar with addresses in hexadecimals. You know hex-values from

    Ethernet MAC addresses. Lets have a look at the basic maths that we need. In module 3 ofTCP/IP basics you learned about converting decimal values to binary values and vice versa.In hexadecimals each position represents a value between 0 and 15. 10 to 15 are shown asthe letters A-F.

    If we wanted to convert the first 16 bit section of the IPv6 address shown into the decimalvalue 65281, we calculate it as shown in the blue box. Conversion of the same value into abinary format is just as easy.

  • 8/19/2019 ipv6_m2_v1-2e

    5/10

    IPv6 Basics, Version 1.2e © T.O.P. BusinessInteractive GmbH Page 5 of 10

    2.3 IPv6 Compression Format

    IPv6 addresses look cumbersome and confusing at first. To simplify writing and handling forhumans 2 compression formats exist. IPv6 addresses often contain larger strings of zeros. It

    is acceptable to drop leading zeros in single 16 bit fields, intermediate zeros can not becompressed because this would represent the wrong values. 00B3 is wrong in this example.

    If 16-bit values of an IPv6 address contain only zeros, then it is fine to compress these 16 bitfields and shown them as two colons. This compression method is only allowed once in eachaddress. In this example we cant get back to the original address, because we don’t knowwhere to put the zeros.

  • 8/19/2019 ipv6_m2_v1-2e

    6/10

    IPv6 Basics, Version 1.2e © T.O.P. BusinessInteractive GmbH Page 6 of 10

    2.4 IPv6 Address Types (1/2)

    Like IPv4, IPv6 is able to use unicasts to address single hosts and multicasts to address

    multiple hosts at once.

    A new concept which we can’t cover in depth here is the anycast. Imagine one practical useof an anycast to be an address assigned to more than one host. If you send a packet to ananycast address, you reach the nearest host with this anycast address. In this example twohosts any1 and any2 share the same anycast address 2002::4711. If Chris tries to reach thisaddress, he will reach any1, if Tom wants to reach the same address, he will reach any2.There is no IPv6 broadcast address like in IPv4. Multicasts are used instead to reducenetwork traffic.

  • 8/19/2019 ipv6_m2_v1-2e

    7/10

    IPv6 Basics, Version 1.2e © T.O.P. BusinessInteractive GmbH Page 7 of 10

    2.4 IPv6 Address Types (2/2)

    Like IPv4, IPv6 has different types of addresses identified by special prefixes. There is asingle loopback address and a site local address range which has been deprecated. Both ofthese are unicast addresses. The unspecified address is never assigned to a node. Itindicates the absence of an IPv6 address.

    Instead of site local addresses unique local Ipv6 unicast addresses can be used. They areself generated but have an extremely high probability of being unique

    The concept of a „link local“ address range is also new. Every IPv6 node is assigned a linklocal address on each of its interfaces automatically. A link local address is never forwardedover a local link. This implies that every IPv4 node uses several IPv6 addresses at a time.Multicast addresses use the prefix FF00::/8. Anycast addresses can be either link-local,global unicast or site-local addresses.

    You may find conflicting statements about which IP addresses will be globally routable andhow site local addresses may be used. In the literature you will find the term „aggregateableglobal„ for IP addresses that are given to service providers by regional internet registries.Since address assignment policies might yet change we will not look at this in detail here.The aggregateable global ranges currently use the binary prefix „0010“. This corresponds to2 as the first byte of the aggregateable global IP addresses already mentioned. Global routeaggregation is needed to keep internet router routing tables small. We will look at this in therouting module.

  • 8/19/2019 ipv6_m2_v1-2e

    8/10

    IPv6 Basics, Version 1.2e © T.O.P. BusinessInteractive GmbH Page 8 of 10

    2.5 IPv6 Subnetting and Global Routing

    With IPv4 and CIDR (Classless Inter Domain Routing) you are used to VLSM (VariableLength Subnet Masks). With IPv6 it is normal to use a fixed number of bits for each subnet.This is true, even if only a small number of addresses is needed - like on a point to point linkfor example –because so many addresses are available in IPv6.

    We have already met the subnet prefix. This is divided into a global routing prefix and asubnet ID. From the very beginning of IPv6 the Link Local Interface ID was designed to beautoconfigured. The interface ID can be derived using Extended Unique Identifier EUI-64addressing. The Interface ID contains the MAC address of the interface network card whenusing EUI-64.

    The current internet standard „Request for Comment“ RFC3587 publishes an addressstructure in which the remaining 64 bits - the first half of the IPv6 address – are separated

    into a 48 bit global routing prefix and a 16 bit subnet id. The customer can use the 16 subnetbits to represent his internal network structure.

  • 8/19/2019 ipv6_m2_v1-2e

    9/10

    IPv6 Basics, Version 1.2e © T.O.P. BusinessInteractive GmbH Page 9 of 10

    2.6 EUI-64 INterface ID

    We will need a basic understanding of EUI-64 because we will meet it often throughout thecourse. So lets build a complete IPv6 address for this prefix using an ethernet MAC address

    as an example. The Prefix shown is missing an Interface ID, so let's derive one from theMAC address using the EUI-64 format.

    The upper 3 bytes of a MAC address carry the OUI, the Organizational Unique Identifier thatlinks to the manufacturer of the card. The lower 3 bytes are assigned by the manufacturerand are supposed to be unique within his OUI range.

    In a first step, the MAC address is split in half and FF:FE is inserted in the middle of theaddress to get a 64 bit MAC address. Bit 7 in the first byte of the MAC address carries a flagthat shows if the MAC address is globally unique. In a second step, this is simply reversedwhich leads us to our complete IPv6 node address.

  • 8/19/2019 ipv6_m2_v1-2e

    10/10

    IPv6 Basics, Version 1.2e © T.O.P. BusinessInteractive GmbH Page 10 of 10

    2.7 Multiple IP Addresses

    In this example the host tweety was assigned a static IPv6 address of fe00::1/64 on hisethernet interface en0.

    The IPv6 protocol stack assigned automatically a second address which is a „link local“address. We know this because of the link local prefix FE80. The lower 64 bits of the linklocal address were derived from the MAC address using EUI-64. We can see the 7th bit inthe highest MAC address byte has been flipped from 00 to 02.

    In addition we can see both of the address compression formats in use, 020d is written as20d and fe00 - many zeros - 1 is shown as fe00::1 in the command output.