You are on page 1of 42

IPV-6

Computer Communication & Networking—


CE - 402

Department of Computer Engineering, SSUET

CE - 402 Instructor: M. Rehan Rasheed 1


IPv6

The network layer protocol in the TCP/IP protocol suite is


currently IPv4. Although IPv4 is well designed, data
communication has evolved since the inception of IPv4 in the
1970s. IPv4 has some deficiencies that make it unsuitable for
the fast-growing Internet.

CE - 402 Instructor: M. Rehan Rasheed 2


IPv6 Addressing Overview
 IPv6 increases the number of address bits by a factor of 4,
from 32 to 128, providing a very large number of addressable
nodes.

IPv4 = 32 bits

11111111.11111111.11111111.11111111

IPv6 = 128 bits

11111111.11111111.11111111.11111111 11111111.11111111.11111111.11111111 11111111.11111111.11111111.11111111 11111111.11111111.11111111.11111111

CE - 402 Instructor: M. Rehan Rasheed 3


IPv6 Address Specifics
 The 128-bit IPv6 address is written using 32 hexadecimal
numbers.
 The format is x:x:x:x:x:x:x:x, where x is a 16-bit hexadecimal
field, therefore each x represents four hexadecimal digits.

 Example address:

 2035:0001:2BC5:0000 : 0000:087C:0000:000A

 2001:0000:5723:0000:0000:D14E:DBCA:0764

CE - 402 Instructor: M. Rehan Rasheed 4


Abbreviating IPv6 Addresses
 Leading 0s within each set of four hexadecimal digits can be
omitted.
 09C0 = 9C0

 0000 = 0

 A pair of colons (“::”) can be used, once within an address, to


represent any number (“a bunch”) of successive zeros.
 Rules.
1. 8 groups of 4 hexadecimal digits.
2. Each group represents 16 bits (4 hexa digits * 4 bit)
3. Separator is “:”
4. Hex digits are not case sensitive, so “DBCA” is same as
“dbca” or “DBca”…

CE - 402 Instructor: M. Rehan Rasheed 5


IPv6 Address Abbreviation Example

2031:0000:130F:0000:0000:09C0:876A:130B

2031: 0:130F: 0: 0: 9C0:876A:130B

2031:0:130F:0:0:9C0:876A:130B

2031:0:130F::9C0:876A:130B

CE - 402 Instructor: M. Rehan Rasheed 6


More IPv6 Address Abbreviation Examples
FF01:0000:0000:0000:0000:0000:0000:1
= FF01:0:0:0:0:0:0:1
= FF01::1

E3D7:0000:0000:0000:51F4:00C8:C0A8:6420
= E3D7::51F4:C8:C0A8:6420

3FFE:0501:0008:0000:0260:97FF:FE40:EFAB
= 3FFE:501:8:0:260:97FF:FE40:EFAB

= 3FFE:501:8::260:97FF:FE40:EFAB

CE - 402 Instructor: M. Rehan Rasheed 7


IPv6 Address Components
 An IPv6 address consists of two parts:
 A subnet prefix

 An interface ID

IPv6 = 128 bits


11111111.11111111.11111111.11111111 11111111.11111111.11111111.11111111 11111111.11111111.11111111.11111111 11111111.11111111.11111111.11111111

Subnet prefix Interface ID

The full syntax of IPv6 is


where ipv6-address/prefix-length
+ ipv6-address is the 128-bit IPv6 address
+ /prefix-length is a decimal value representing how many of the left most
contiguous bits of the address comprise the prefix.

CE - 402 Instructor: M. Rehan Rasheed 8


Subnet Prefix
 IPv6 uses CIDR notation to denote the number of bits that
represent the subnet.
Example:

FC00:0:0:1::1234/64
is really
FC00:0000:0000:0001:0000:0000:0000:1234/64
 The first 64-bits (FC00:0000:0000:0001) forms the address

prefix.
 The last 64-bits (0000:0000:0000:1234) forms the Interface

ID.

CE - 402 Instructor: M. Rehan Rasheed 9


Subnet Prefix
Example 2:
2001:C:7:ABCD::1/64 is really

2001:000C:0007:ABCD:0000:0000:0000:0001/64

The first 64-bits 2001:000C:0007:ABCD is the address prefix

The last 64-bits 0000:0000:0000:0001 is the interface ID

The prefix length is almost always /64.


 However, IPv6 rules allow for either shorter or longer prefixes
Deploying a /64 IPv6 prefix on a device recommended.

CE - 402 Instructor: M. Rehan Rasheed 10


Practice Problems
Show the unabbreviated colon hex notation for the following IPv6
addresses:

a. An address with 64 0s followed by 64 1s.


b. An address with 128 0s.
c. An address with 128 1s.
d. An address with 128 alternative 1s and 0s.

CE - 402 Instructor: M. Rehan Rasheed 11


Practice Problems
Show the unabbreviated colon hex notation for the following IPv6
addresses:

a. An address with 64 0s followed by 64 1s.


b. An address with 128 0s.
c. An address with 128 1s.
d. An address with 128 alternative 1s and 0s.

Solution
a. 0000:0000:0000:0000:FFFF:FFFF:FFFF:FFFF
b. 0000:0000:0000:0000:0000:0000:0000:0000
c. FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF
d. AAAA:AAAA:AAAA:AAAA:AAAA:AAAA:AAAA:AAAA

CE - 402 Instructor: M. Rehan Rasheed 12


Practice Problems
Show abbreviations for the following addresses:
a. 0000:0000:FFFF:0000:0000:0000:0000:0000
b. 1234:2346:0000:0000:0000:0000:0000:1111
c. 0000:0001:0000:0000:0000:0000:1200:1000
d. 0000:0000:0000:0000:0000:FFFF:2412:3126

CE - 402 Instructor: M. Rehan Rasheed 13


Practice Problems
Show abbreviations for the following addresses:
a. 0000:0000:FFFF:0000:0000:0000:0000:0000
b. 1234:2346:0000:0000:0000:0000:0000:1111
c. 0000:0001:0000:0000:0000:0000:1200:1000
d. 0000:0000:0000:0000:0000:FFFF:2412:3126

Solution
a. 0:0:FFFF::
b. 1234:2346::1111
c. 0:1::1200:1000
d. ::FFFF:2412:3126

CE - 402 Instructor: M. Rehan Rasheed 14


Practice Problems
Decompress the following addresses and show the complete
unabbreviated IPv6 address:

a. 1111::2222
b. ::
c. 0:1::
d. AAAA:A:AA::1234

Instructor:
CE - 402 M. Rehan Rasheed 15
Practice Problems
Decompress the following addresses and show the complete
unabbreviated IPv6 address:

a. 1111::2222
b. ::
c. 0:1::
d. AAAA:A:AA::1234

Solution
a. 1111:0000:0000:0000:0000:0000:0000:2222
b. 0000:0000:0000:0000:0000:0000:0000:0000
c. 0000:0001:0000:0000:0000:0000:0000:0000
d. AAAA:000A:00AA:0000:0000:0000:0000:1234

Instructor:
CE - 402 M. Rehan Rasheed 16
Loopback address

The loopback address in IPv6 is ::1/128.


It should never be used as a
destination address.

CE - 402 Instructor: M. Rehan Rasheed 17


IPv6 Address Types
Address Type Description Topology

“One to One”
• An address destined for a single interface.
Unicast • A packet sent to a unicast address is delivered to the
interface identified by that address.

“One to Many”
• An address for a set of interfaces (typically belonging
Multicast to different nodes).
• A packet sent to a multicast address will be delivered
to all interfaces identified by that address.

“One to Nearest” (Allocated from Unicast)


• An address for a set of interfaces.
• In most cases these interfaces belong to different
nodes.
Anycast • created “automatically” when a single unicast address
is assigned to more than one interface.
• A packet sent to an anycast address is delivered to
the closest interface as determined by the IGP.

CE - 402 Instructor: M. Rehan Rasheed 18


IPv6 Unicast Address Scopes
 Address types have well-defined destination scopes:
 Link-local address

 Site-local address (replaced by Unique-local addresses)

 Global unicast address

Global Site-Local Link-Local


(Internet)

CE - 402 Instructor: M. Rehan Rasheed 19


IPv6 Unicast Address Scopes
 Link-local addresses—only on single link, not routed
 FE80 prefix

 Unique-local addresses—routed within private network


 FC00 prefix

 Global unicast addresses—globally routable


 2001 prefix most common

CE - 402 Instructor: M. Rehan Rasheed 20


Unicast Addresses
 Two Types of Local-Use Addresses defined.

 Link-Local - used on a single network


 Used to address a host on the local network (subnet)
 Routers will not forward these packets

CE - 402 Instructor: M. Rehan Rasheed 21


IPv6 Addressing Cont.

 Site-local addresses allowed devices in the same organization, or


site, to exchange data.
 Site-local addresses start with the prefix FEC0::/10.

 Routers will forward these packets only within the site only.

CE - 402 Instructor: M. Rehan Rasheed 22


Multiple IPv6 Addresses per Interface
 An interface can have multiple global IPv6 addresses.
 Typically, an interface is assigned a link-local and one (or
more) global IPv6 address.
 For example, an Ethernet interface can have:
 Link-local address

(FE80::21B:D5FF:FE5B:A408)
 Global unicast address

(2001:8:85A3:4289:21B:D5FF:FE5B:A408)
 The Link-local address is used for local device
communication.
 The Global address is used to provide Internet
reachability.

CE - 402 Instructor: M. Rehan Rasheed 23


Features and Benefits of IPv6
 Larger address space
 Elimination of public-to-private NAT
 Elimination of broadcast addresses
 Simplified header for improved router efficiency
 Support for mobility and security
 Many devices and applications already support IPv6

CE - 402 Instructor: M. Rehan Rasheed 24


Features and Benefits of IPv6 - Continued
 Multiple addresses per interface
 Address autoconfiguration
 No requirement for DHCP

 Link-local and globally routable addresses


 Multiple-level hierarchy by design
 More efficient route aggregation

 Transition mechanisms from IPV4 to IPV6


 Migration from IPv4 to IPv6, a number of transition

mechanisms are available including dual-stack, tunneling


and protocol translation.

CE - 402 Instructor: M. Rehan Rasheed 25


IPv6 Header Improvements
The simplified IPv6 header provides several advantages over IPv4:

Routing efficiency is improved for performance and forwarding-rate


scalability.
There is no requirement for processing checksums, which IPv6 leaves to the
Data Link Layer and/or upper layers.
A simpler and more efficient extension header mechanism allows multiple
optional extension headers in a single IPv6 packet.
Flow labels provide per-flow processing with no need to examine the
transport layer information to identify the various traffic flows.

CE - 402 Instructor: M. Rehan Rasheed 26


IPv4 Header vs. IPv6 Header

CE - 402 Instructor: M. Rehan Rasheed 27


IPv6 Header
 Version —A 4-bit field, the same as in IPv4. For IPv6, this field contains the
number 6.

 Traffic class —An 8-bit field similar to the type of service (ToS) field in IPv4.
This field tags the packet with a traffic class that it uses in differentiated services
(DiffServ) quality of service (QoS). These functionalities are the same for IPv6 and
IPv4.

 Flow label —This 20-bit field is new in IPv6. It can be used by the source of the
packet to tag the packet as being part of a specific flow, allowing multilayer
switches and routers to handle traffic on a per-flow basis rather than per-packet, for
faster packet-switching performance. This field can also be used to provide QoS.

 Payload length —This 16-bit field is similar to the IPv4 total length field.

 Next header —The value of this 8-bit field determines the type of information that
follows the basic IPv6 header. It can be a transport-layer packet, such as (TCP) or
(UDP), or it can be an extension header. The next header field is similar to the
protocol field of IPv4.

CE - 402 Instructor: M. Rehan Rasheed 28


Protocol and Next Header Fields

CE - 402 Instructor: M. Rehan Rasheed 29


IPv6 Header
 Hop limit —This 8-bit field specifies the maximum number of hops that an IP
packet can traverse. Similar to the time to live (TTL) field in IPv4, each router
decreases this field by one. Because there is no checksum in the IPv6 header, an
IPv6 router can decrease the field without recomputing the checksum; in IPv4
routers this is recomputation costs processing time. If this field ever reaches 0, a
message is sent back to the source of the packet and the packet is discarded.

 Source address —This field has 16 octets or 128 bits.


 Destination address —This field has 16 octets or 128 bits.

 Extension headers —The extension headers, if any, and the data portion of the
packet follow the other eight fields. The number of extension headers is not fixed,
so the total length of the extension header chain is variable.

 Notice that the IPv6 header does not have a header checksum field. Because link-
layer technologies perform checksum and error control and are considered
relatively reliable, an IP header checksum is considered to be redundant. Without
the IP header checksum, upper-layer checksums, such as within UDP, are
mandatory with IPv6.

CE - 402 Instructor: M. Rehan Rasheed 30


Extension Headers
 The Next Header field identifies what follows the
Destination Address field:

(Optional) Extension Header(s)

Data …

CE - 402 Instructor: M. Rehan Rasheed 31


Extension Headers
 The destination node examines the first extension header (if any).

CE - 402 Instructor: M. Rehan Rasheed 32


Extension Header Options

Fragmentation Header - IPv6 only allows fragmentation at source and


destination nodes (IPv4 had the ability to fragment packets at any point in
path). The header contains fields that identify a group of fragments as a
packet and assign them sequence number

CE - 402 Instructor: M. Rehan Rasheed 33


Comparison of Headers
 V6: 6 fields + 2 addr
 V4: 10 fields + 2 addr + options
 Deleted:
 Header length
 type of service
 identification, flags, fragment offset
 Header Checksum
 Added:
 Priority
 Flow label
 Renamed:
 length -> Payload length
 Protocol -> Next header
 time to live -> Hop Limit
 Redefined: Option mechanism

CE - 402 Instructor: M. Rehan Rasheed 34


New Fields
 Total Length  Payload Length
 not include header length
 max length 64Kbytes with provision for larger packets using “jumbo
gram” option
 Protocol Type  Next header, can be set to:
 Protocol type (UDP,TCP, etc..)
 Type of first extension header
 TTL  Hop limit
 “Truth in advertising!”,
 number of hops NOT number of seconds

Renaming
 Flow label & Priority
to facilitate the handling of real time traffic

CE - 402 Instructor: M. Rehan Rasheed 35


Transition from IPv4 to IPv6
 Because of the huge number of systems on the Internet, the
transition from IPv4 to IPv6 cannot happen suddenly. It takes
a considerable amount of time before every system in the
Internet can move from IPv4 to IPv6. The transition must be
smooth to prevent any problems between IPv4 and IPv6
systems.
 The key to a successful IPv6 transition is compatibility with
the large installed base of IPv4 hosts and routers.

 Maintaining compatibility with IPv4 while deploying IPv6


will streamline the task of transitioning the Internet to IPv6.

 At the beginning, all IPv6-capable hosts will also be IPv4-


capable so as to retain connectivity with the existing Internet.

20.36
CE - 402 Instructor: M. Rehan Rasheed
Three transition strategies

CE - 402 Instructor: M. Rehan Rasheed 37


Dual stack

 To transform IPv4 into a dual-stack IPv6-capable host, it


should include:
 The IPv6 basic code

 Handling IPv6 within TCP & UDP

 Modify socket interface to support new addresses

 Handling the interface with the name service

CE - 402 Instructor: M. Rehan Rasheed 38


Tunneling strategy

 Tunneling provides a way to utilize an existing IPv4 routing


infrastructure to carry IPv6 traffic. IPv6/IPv4 hosts and routers
can tunnel IPv6 datagrams over regions of IPv4 routing
topology by encapsulating them within IPv4 packets.
 Use IPv4-compatible addresses

CE - 402 Instructor: M. Rehan Rasheed 39


Header translation strategy

CE - 402 Instructor: M. Rehan Rasheed 40


IPv4-compatible address
All-zeros 96-bit prefix, and holds an IPv4 address in the lower order
32-bits.
 Last 32-bits are a valid IPv4 address

 Assigned to IPv6 systems communicating via an intermediate

IPv4 network (tunneling)

CE - 402 Instructor: M. Rehan Rasheed 41


Header translation

CE - 402 Instructor: M. Rehan Rasheed 42

You might also like