IPv6 This will be real shortly Packet format Header format and contents Address space & allocation...

75
IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions • Fragmentation • ICMPv6 • Security

Transcript of IPv6 This will be real shortly Packet format Header format and contents Address space & allocation...

Page 1: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

IPv6

This will be real shortly

• Packet format• Header format and contents• Address space & allocation• Header extensions• Fragmentation• ICMPv6• Security

Page 2: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

Ipv6

Internet Protocol Connectionless communication Best effort delivery Virtual addressing Address is 128 bits

2128 = 340,000,000,000,000,000,000,000,000,000,000,000,000 Provides for some increase in security Increases the address space from 232 to 2128

A modest increase of 296 = 90,000,000,000,000,000,000,000,000,000

Page 3: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

Ipv6 RFC's

RFC 2460 – Ipv6 Specification RFC 2373 – Addressing Architecture RFC 2463 – ICMP RFC 2473 – Packet Tunneling RFC 2675 - Jumbograms RFC 2732 – Ipv6 addresses in URL's RFC 3041 – Privacy Extensions RFC 2464 – Ipv6 over Ethernet RFC 3879 – SiteLocal Addresses

Plus many others

Page 4: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

IPv6 Datagram Format

1st Header Payload

Total datagram size constraintsMaximum 216 -1bytes, unless!Header length 10 32-bit words (40 bytes) Plus other headers

nth Header...

Page 5: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

IPv6 Datagram Header

Ver Traffic Class Flow Label

Payload Length Next Header Hop Limit

Source Address4 * 4 * 8 bits

Destination Address4 * 4 * 8 bits

Bit 0 15 16

31

Word 0Word 1

Word 3

Word 7

11 12

3 4 23 24

Page 6: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

IP Datagram (cont)

Ver IP Version 6Traffic Class 8 bit priority valueFlow Label May indicate special handlingPayload Length Actual length of payload including all

extension headers or 0Next header 8-bits that identifies the next header

Similar to protocol field in IPv4Hop limit Similar to IPv4 ttlSource Address IP address of senderDestination Address IP address of destination

Page 7: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

Definitons

Node: A device that implements Ipv6

Router: A node that forwards Ipv6 packets not explicitly addressed to itself.

Host: Any node that is not a router.

Link: Layer 2 communication link over which nodes can communicate.

Neighbors: Nodes attached to the same link.

Interface: A node's attachment to a link.

Address: An IPv6 identifier for an interface or set of interfaces.

Packet: An IPv6 header plus payload.

Page 8: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

Ipv6 Address Types

Unicast: An identifier for a single interface. A packet sent to a unicast address is delivered to that addressed interface.

Anycast: An identifier for a set of interfaces. A packet sent to an anycast address is delivered to one (usually the neaest) of the addressed interfaces.

Multicast: An identifier for a set of interfaces. A packet sent to a multicast address is delivered to all interfaces identified by that address.

Broadcast: No longer. Must use multicast.

Page 9: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

IPv6 Address Model

Addresses are assigned to interfaces not to nodes.

Every interface is required to have at least one link-local unicast address.

An interface may have multiple addresses.

A subnet prefix is associated with one link.Multiple subnets may be assigned to the same link.

Page 10: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

IPv6 Address Representation

Generally an IPv6 address is 8 16 bit hex numbers separated by :'s.

For example:FEDC:BA98:7654:3210:FEDC:BA98:7654:32101080:0000:0000:0008:0080:200C:417A:12341080:0:0:8:80:200C:417A:1234

(Note: the last two are equivalent)

Leading zeros can be suppressed within a field.

Page 11: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

Ipv6 Address Representation(cont'd)

Ipv6 addresses tend to have way to many zeros. Sometimes these strings of zeros can be compressed.

:: indicates multiple groups of 16-bits of zeros.Only one :: per address.:: can be used to compress both leading and trailing zeros.

For example:1080:0:0:0:8:800:200C:417A 1080::8:800:200C:417AFF01:0:0:0:0:0:0:101 FF01::1010:0:0:0:0:0:0:1 ::10:0:0:0:0:0:0:0 ::

Page 12: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

IPv4 Addresses inIPv6 Addresses

IPv4 addresses can be embedded within an IPv6 address.Generally it looks like x:x:x:x:x:x:d.d.d.d

For example:0:0:0:0:0:0:13.1.68.3

or ::13.1.68.30:0:0:0:0:FFFF:129.144.52.38 or ::FFFF:129.144.52.38

Page 13: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

IPv6 Address Prefixes

As in IPv4, IPv6 the network address is represented as an address prefix. Usually indicated by a number of left most bits.

For example representations of the 60-bit prefix 12AB00000000CD3 (hex) are:

12AB:0000:0000:CD30:0000:0000:0000:0000/6012AB::CD30:0:0:0/6012AB:0:0:CD30::/60

Often both a node's address and it's prefix can be combined12AB::CD30:1234:4567:89AB:CDEF/60

Page 14: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

Address Types

Bit Number 0 1 2 3 4 5 6 7

Address prefix (binary) Allocation0 0 0 0 0 0 0 0 Reserved 1/2560 0 0 0 0 0 0 1 Unassigned 1/256

0 0 0 0 0 0 1 NSAP Allocation 1/1280 0 0 0 0 1 0 IPX Allocation 1/128

0 0 0 0 0 1 1 Unassigned 1/1280 0 0 0 1 Unassigned 1/320 0 0 1 Unassigned 1/16

0 0 1 Global Unicast Addresses 1/80 1 0 Unassigned 1/80 1 1 Unassigned 1/81 0 0 Unassigned 1/81 0 1 Unassigned 1/81 1 0 Unassigned 1/8

Page 15: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

Address Types cont'd

Bit Number 0 1 2 3 4 5 6 7

Address prefix (binary) Allocation1 1 1 0 Unassigned 1/161 1 1 1 0 Unassigned 1/321 1 1 1 1 0 Unassigned 1/641 1 1 1 1 1 0 Unassigned 1/1281 1 1 1 1 1 1 0 0 Unassigned 1/512

1 1 1 1 1 1 1 0 1 0 Link-local unicast 1/10241 1 1 1 1 1 1 0 1 1 Site-local unicast 1/1024

1 1 1 1 1 1 1 1 Multicast Addresses 1/256

Page 16: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

Special Addresses

0:0:0:0:0:0:0:0 Is the Unspecified addressThe only permitted use of this address is as the source address before the nodehas learned its own address.

0:0:0:0:0:0:0:1 Is the Loopback addressMust never appear outside of a single node.

Page 17: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

IPv4 Addressesin IPv6 Addresses

Node address

0

0000 0000 Something goes here IPv4 Address32 bits80 bits 16 bits

Page 18: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

Unicast Addresses

Node address

0 127

Node address

0 127

Node address

0 127

Subnet1 prefix Subnet

2 prefix

Subnet prefix Interface ID

Interface ID

m-1m bits 128-m bits

128 bits

128-m-n bitsm bits n bits

Page 19: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

Interface Identifiers

Node address

0 127

Subnet prefix, link address Interface ID

6364 bits 64 bits

Interface IDs are used to identify interfaces on a link.They must be unique on the link.They may be unique over a broader scope, i.e. the entire net.Often the interface ID is the interface's link-layer address, e.g.

The ethernet NIC's MAC address.

A single node with multiple interfaces may have the same interface ID's.

64

Page 20: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

EUI-64 Interface IdentifiersExtended Unique Identifier

Node address

0 127

Subnet prefix, link address Interface ID6364 bits 64 bits

EUI-64 Interface IDs have global scope when a global token is available.

cccc|ccug|cccc|cccc|cccc|cccc|mmmmmmmm|mmmmmmmm|mmmmmmmm|mmmmmmmm|mmmmmmmm

|0 7|8 15|16 23|24 31|32 47|48 63|

“c” are the company ID bits.“m” are the company's extension identifier, as in IEEE ether net NICs.“u” is the universal/local bit: u = 1 indicates global scope.“g” is the individual/group bit

Page 21: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

EUI-64 Interface Identifiersfor IEEE 802 MAC addresses

Node address

0 127

Subnet prefix, link address Interface ID6364 bits 64 bits

EUI-64 Interface IDs should have global scope when a global token is available.

cccc|cc1g|cccc|cccc|cccc|cccc|11111111|11111110|mmmmmmmm|mmmmmmmm|mmmmmmmm

|0 7|8 15|16 23|24 31|32 47|48 63|

“c” are the company ID bits.“m” are the company's extension identifier, as in IEEE ether net NICs.Global scope.“g” is the individual/group bit

Page 22: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

Local-Use IPv6 Addresses

0 Interface ID

64 bits10 bits 54 bits

1111111010

0 Interface ID

64 bits10 bits 38 bits

1111111011

16 bits

Subnet ID

Link-Local addresses

Site-Local addresses (deprecated in 2004)

Auto-address configuration, neighbor discovery

Addressing inside a site without the need for a global prefix.

This the site-local address type has be deprecated by RFC 3879, 9/04.

Page 23: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

Aggregatable Global Unicast Addresses

Interface ID

64 bits || 3| 13 |

FP

24 |

NLAID

Provides support for current provider based aggregation and exchanges, a new type of aggregation.

FP Format prefix = “001”TLA ID Top Level Aggregation IdentifierRES Reserved for future useNLA ID Next-Level Aggregation IdentifierSLA ID Site-Level Aggregation IdentifierInterface ID Interface Identifier

Bits

TLAID

8 |

RES SLAID

16 |

Reference: RFC 2374

Page 24: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

Aggregatable Global Unicast Addresses for Testing

Interface ID

64 bits || 3| 13 |

FP

24 |

NLAID

Provides support for 6bone IPv6 testing.

FP Format prefix = “001”TLA ID 0x1ffe - Top Level Aggregation IdentifierRES Reserved for future useNLA ID Next-Level Aggregation IdentifierSLA ID Site-Level Aggregation IdentifierInterface ID Interface Identifier

Bits

TLAID

8 |

RES SLAID

16 |

Reference: RFC 2471

Page 25: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

Multicast IPv6 Addresses

flgs group ID

| 8 | 4 | 4 | 112 bits |

11111111

Multicast addressesAn identifier for a group of nodesA node may belong to any number of multicast groups

scope

Multicast addresses must never be used as a source address in IPv6.

Page 26: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

Multicast IPv6 Addresses(cont'd)

The first 3 bits of “flgs” are reserved and must be (0) zero.

T = 0 indicates a permanently assigned multicast address This address is assigned by the global Internet numbering authority

T = 1 indicates a non-permanently assigned multicast address

Flgs group ID

| 8 | 4 | 4 | 112 bits |

11111111

Multicast addresses

scope

Flgs is a set of 4 flags: 0 | 0 | 0 | T

Page 27: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

Multicast IPv6 Addresses(cont'd)

flgs group ID

| 8 | 4 | 4 | 112 bits |

11111111

Multicast addresses

“scope” is a 4-bit multicast scope value to limit the scope of the multicast group.

reserved 0, Funassigned 3, 4, 6, 7, 9, A, B, C, Dnode-local 1link-local 2site-local 5organization-local 8global E

scope

Page 28: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

Multicast IPv6 Addresses(cont'd)

Examples of multicast addresses

Assume that NTP is assigned a permanent multicast group ID of 0x101, then:

FF01:0:0:0:0:0:0:101 means all NTP servers on the same node as the sender.FF02:0:0:0:0:0:0:101 means all NTP servers on the same link as the sender.FF05:0:0:0:0:0:0:101 means all NTP servers on the same site as the sender.FF0E:0:0:0:0:0:0:101 means all NTP servers on the internet.

All nodes addresses All routers addressesnode-local and Link-local: node-local, Link-local and site-local:

FF01:0:0:0:0:0:0:1 FF01:0:0:0:0:0:0:2FF02:0:0:0:0:0:0:1 FF02:0:0:0:0:0:0:2

FF05:0:0:0:0:0:0:2

The following multicast addresses are reserved and shall never be assigned to any group:

FF0X:0:0:0:0:0:0:0 where X ranges from 0 – F.

Page 29: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

Required Addresses

A node is required to recognize the following addresssesas itself:

– Its link-local address– Assigned unicast addresses– Loopback address– All-nodes multicast address– Solicited-node multicast

Page 30: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

Frame 15 (70 bytes on wire, 70 bytes captured)Ethernet II, Src: 00:0d:93:88:6a:48, Dst: 33:33:00:00:00:02 Destination: 33:33:00:00:00:02 (Ipv6-Neighbor-Discovery_00:00:00:02) Source: 00:0d:93:88:6a:48 (AppleCom_88:6a:48) Type: IPv6 (0x86dd)Internet Protocol Version 6 Version: 6 Traffic class: 0x00 Flowlabel: 0x00000 Payload length: 16 Next header: ICMPv6 (0x3a) Hop limit: 255 Source address: fe80::20d:93ff:fe88:6a48 (fe80::20d:93ff:fe88:6a48) Destination address: ff02::2 (ff02::2)Internet Control Message Protocol v6 Type: 133 (Router solicitation) Code: 0 Checksum: 0x7f72 (correct) ICMPv6 options Type: 1 (Source link-layer address) Length: 8 bytes (1) Link-layer address: 00:0d:93:88:6a:48

0000 33 33 00 00 00 02 00 0d 93 88 6a 48 86 dd 60 00 33........jH..`.0010 00 00 00 10 3a ff fe 80 00 00 00 00 00 00 02 0d ....:...........0020 93 ff fe 88 6a 48 ff 02 00 00 00 00 00 00 00 00 ....jH..........0030 00 00 00 00 00 02 85 00 7f 72 00 00 00 00 01 01 .........r......0040 00 0d 93 88 6a 48 ....jH

Page 31: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

Ethernet frame header (6 bytes dst, 6 bytes src 2 bytes size/type):

0000 33 33 00 00 00 02 00 0d 93 88 6a 48 86 dd

Ipv6: Ver, Type, Flow, Payload Length, Next Header, hop limit0000 60 00 0010 00 00 00 10 3a ff Next header 3a = 58 – ICMP

Source Address:0010 fe 80 00 00 00 00 00 00 02 0d 0020 93 ff fe 88 6a 48

1111 1110 0100 0000::0 0010 0d: 93 ff fe 88: 6a 48 link local address c ug cc cc Mac Address

Destination Address (multicast all nodes link-local):0020 ff 02 00 00 00 00 00 00 00 00 0030 00 00 00 00 00 02

ICMP Message (Type 85 = 133 – router solicitation) : Type Checksum0030 85 Code 00 Checksum 7f 72 Reserved 00 00 00 00 TLV Type 01 Length of this TLV Header in 8-octet units 01 Source Link layer address0040 00 0d 93 88 6a 48

Page 32: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

IPv6 Datagram Extension Headers

Ver Traffic Class Flow Label

Payload Length Next Header Hop Limit

Source Address4 * 4 * 8 bits

Destination Address4 * 4 * 8 bits

Bit 0 15 16 31

Word 0Word 1

Word 3

Word 7

11 123 4 23 24

Extension Headers

Word 11

Page 33: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

Extension Headers

Currently defined extension headers Next Header Value

– Hop-by-Hop Options 0– Routing Header 43– Fragment Header 44– Destination Options 60– Authentication 51– Encapsulating Security Payload 50– ICMP Header 58– No next header 59

Page 34: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

Extension Headers

Next header values also indicate the protocol field that follows the extension headers.

Next Header Value

– TCP 1– UDP 17– OSPF 89

Page 35: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

Extension Header Order

– IPv6 header– Hop-by-Hop Options header– Destination Options header– Routing header– Fragment header– Authentication header– Encapsulating Security Payload header– Destination Options header– ICMP header– Upper-layer header

Page 36: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

Hop-by-Hop Options Header

Bit 0 15 16 31

Next Header

7 8

Next Header 8-bit selector identifies the type of the next header.Hdr Ext Len 8-bit unsigned integer indicating the length of this header

in 8-octet units, not including the first 8 octets.Options Contains one or more TLV-encoded options and padding

so that the entire header is and integer multiple of 8-octets long.

Hdr Ext Len

Options

This header carries additional information that must be examined by every node along the packet's delivery path.

Page 37: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

TLV (type-length-value)

Encoded Options

Bit 0 15 16 31

Option Type

7 8

Option Type 8-bit identifier of the type of option.

Opt Data Len 8-bit unsigned integer indicating the length of the optiondata field of this option, in octets

Options Variable length field. Option-Type_specific data.

Opt Data Len

This header carries additional information that must be examined by every node along the packet's delivery path.

Option Data

Page 38: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

TLV Option Types

Bit 0 15 16 31

1|2|3|4|5|6|7|8

7 8

Bit 1 2 3 Action Taken if the option type is not recognized0 0 Skip over this option and continue processing the header0 1 Discard packet1 0 Discard packet and send ICMP Parameter Problem1 1 Discard 0 Option Data does not change enroute 1 Option Data may change

Opt Data Len

The Option Type identifiers are internally encoded such that that the highest-order 2 bits specify the action that must be taken. The third highest bit specifies whether or not the Option Data may be changed. These are used primarily for padding within the options area of a header.

Option Data

Page 39: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

Jumbograms (RFC 2147)

– Permit Datagrams larger than 65,535Actually between 65,536 and 4,294,967,295 = 232 - 1

– A Jumbo Payload Option must be carried in a Hop-by-Hop extension

– IP header must have payload length = 0– Next Header = 0 – next header is a Hop-by-Hop header– Can be used only on links with large enough MTU's– Cannot carry a Fragment Header– Payload can be either TCP or UDP

Page 40: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

Jumbograms

Bit 0 15 16 31

Option Type

7 8

Option Type 8-bit 0xC2 ( 11000010 Option data does not change)Opt Data Len 8-bit value 4Payload Len 32-bit unsigned integer

Opt Data Len

Jumbo Payload Length

Next Header Hdr Ext Len

Page 41: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

Routing Header

Bit 0 15 16 31

Next Header

7 8

Next Header 8-bit selector identifies the type of the next header.Hdr Ext Len 8-bit unsigned integer indicating the length of this header

in 8-octet units, not including the first 8 octets.Routing Type 8-bit identifier of a particular routing header variant.Segments Left 8-bit unsigned integer indicating the number of nodes

to be visited.Type-specific data Info required by the routing type.

Hdr Ext Len Routing Type Segments Left

Type-specific data

Page 42: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

Routing Header

Bit 0 15 16 31

Next Header

7 8

Next Header 8-bit selector identifies the type of the next header.Hdr Ext Len 8-bit unsigned integer indicating the length of this header

in 8-octet units, not including the first 8 octets.Routing Type 8-bit identifier of a particular routing header variant.Segments Left 8-bit unsigned integer indicating the number of nodes

to be visited.Type-specific data Info required by the routing type.

Hdr Ext Len Routing Type Segments Left

Type-specific data

Page 43: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

Type 0 Routing HeaderBit 0 15 16 31

Next Header

7 8

Hdr Ext Len Routing Type Segments Left

Address 1

Address 2

Address n

. . .

Reserved

Page 44: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

Fragment HeaderBit 0 15 16 31

Next Header

7 8

Reserved Fragment Offset M

Identification

Res

28 29

Next Header 8-bit selector identifies the type of the next header.Reserved 8-bit reserved field initialized to 0.Fragment Offset 13-bit unsigned integer indicating the offset of this

fragment in 8-octet units.Res 2reserved field that is initialized to 0.M 1-bit flag: 1 = more fragments; 0 = last fragment.Identification 32 bits IP datagram identification number.

Page 45: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

Fragmenting Packets

UnfragmentablePart

Unfragmentable Part IPv6 Header and all extension headers.Fragmentable Part The rest of the packet..

Original Packet

Fragments

FragmentablePart

UnfragmentablePart

Firstfragment

Secondfragment

Lastfragment

. . .

UnfragmentablePart

FragmentHeader

Firstfragment

UnfragmentablePart

FragmentHeader

Secondfragment

UnfragmentablePart

FragmentHeader

Lastfragment

. . .

Page 46: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

Destination Options Header

Bit 0 15 16 31

Next Header

7 8

Next Header 8-bit selector identifies the type of the next header.Hdr Ext Len 8-bit unsigned integer indicating the length of this header

in 8-octet units, not including the first 8 octets.Options Contains one or more TLV-encoded options and padding

so that the entire header is and integer multiple of 8-octets long.

Hdr Ext Len

Options

This header carries optional information that must be examined only by a packet's destination node. Again this is used primarily for padding.

Page 47: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

Size Issues

• IPv6 requires that every link in the internet have an MTU of 1280 octets or greater.

• Otherwise there must a provision in Layer 2 for fragmentation and reassembly.

Page 48: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

ICMPv6

• Internet Control Message Protocol Ver. 6• RFC 2463• Used to

• Return error codes• Return informational messages

• Sent within an IP datagram• Next Header value of 58• Highly abused protocol

Page 49: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

ICMPv6Message Codes

• Error Messages: Code 0 – 127• 1 Destination Unreachable• 2 Packet too big• 3 Time exceeded• 4 Parameter problem

• Informational Messages: 128 – 255• 128 Echo request• 129 Echo reply

Page 50: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

ICMP Message General Format

Bit 0 15 16 31

Type ChecksumCode

7 8

Message Body

The Type field indicates the type of the message and determines the format of the remaining data.

The Code field depends on the message type.Checksum detects data corruption.

Page 51: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

Destination Unreachable Message

Bit 0 15 16 31

Type ChecksumCode

7 8

As much of the invoking packet without exceeding the my

Unused

Type 1Code 0 – no route to destination

1 – communication with destination admin prohibited2 – not assigned3 – address unreachable4 – port unreachable

Page 52: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

Packet Too BigMessage

Bit 0 15 16 31

Type ChecksumCode

7 8

Type 2

Code 0 – set by sender, ignored by receiver.

MTU The Maximum Transmission of the next-hop link.

MTU

As much of the invoking packet without exceeding the my

Page 53: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

Time ExceededMessage

Bit 0 15 16 31

Type ChecksumCode

7 8

As much of the invoking packet without exceeding the my

Type 3

Code 0 – hop limit exceeded in transit1 – fragment reasssembly time exceeded

Unusedset to 0 by sender, ignored by receiver.

Unused

Page 54: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

Parameter ProblemMessage

Bit 0 15 16 31

Type ChecksumCode

7 8

As much of the invoking packet without exceeding the my

Pointer

Type 4Code 0 – erroneous header field encountered

1 – unrecognized Next Header type encountered2 – unrecognized IPv6 option encountered

Pointer The octet offset of the error within the invoking packet

Page 55: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

Echo RequestMessage

Bit 0 15 16 31

Type ChecksumCode

7 8

Data ...

Type 128Code 0Identifier An identifier to aid in matching Echo Replies

to this Echo Request. May be zero.Seg. No. An identifier to aid in matching Echo Replies

to this Echo Reauest. May be zero.Data Zero or more octets of arbitrary data.

Identifier Sequence Number

Page 56: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

Echo ReplyMessage

Bit 0 15 16 31

Type ChecksumCode

7 8

Data ...

Type 129Code 0Identifier The identifier the invoking Echo Reauest.Seg. No. The sequence number from the invoking

Echo Request.Data The data from the invoking Echo

Request message.

Identifier Sequence Number

Page 57: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

Other InformationalMessages

These are ICMP Informational Messages

Type Code Name

133 0 Router Solicitation134 0 Router Advertisement135 0 Neighbor Solicitation136 0 Neighbor Advertisement137 0 Redirect

RFC 2461 Neighbor Discovery

Neighbor Discovery protocol is used to discover nodes on the same link, their link-layer addresses and to find routers.

Page 58: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

Router SolicitationMessage

Bit 0 15 16 31

Type ChecksumCode

7 8

Options ...

Type 133Code 0Identifier The identifier the invoking Echo Reauest.Reserved Set to zeroOptions Source link-layer address

Reserved

Hosts send Router Solicitations in order to prompt routers to generate Router Advertisements quickly.

Page 59: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

Router AdvertisementMessage

Bit 0 15 16 31

Type ChecksumCode

7 8

Options ...

Current hop limit

Router LifetimeM O Reserved

Routers send out Router Advertisement message periodically, or in response to a Router Solicitation.

Reachable Time

Retrans Time

Page 60: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

Router AdvertisementFields

Type 134Code 0Cur Hop Limit 8-bit unsigned int. Default value that

should be placed in the Hop Count fieldof the IP header.

M 1-bit “Managed address configuration flag.O 1-bit “Other stateful configuration” flag.Reserved 6-bit unsed field.Router Lifetime

16-bit uint. Lifetime associated with the default router in seconds, max 18.2 hours.

Page 61: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

Router AdvertisementFields (cont'd)

Reachable Time32-bir uint. The time, in milliseconds, a node assumes a neighbor is reachable.

Retrans Time32-bit uint. The time between retransmitted Neighbor Solicitation messages.

Possible options:Source link-layer address

The link-layer address of the interface from which the Router Ad is sent.

MTU Should be sent on links that have a variable MTU.

Page 62: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

Neighbor SolicitationMessage

Bit 0 15 16 31

Type ChecksumCode

7 8

Target Address

Nodes send Neighbor Solicitations to request the link-layer address of a target node while also providing their own link-layer address to the target.

Reserved

Options ...

Page 63: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

Neighbor SolicitationFields

Type 135Code 0Reserved UnusedTarget Address The IP address of the solicitation.

It must not be a multicast address.

Possible Options:Source link-layer address

Link-layer address of the sender

Page 64: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

Neighbor AdvertisementMessage

Bit 0 15 16 31

Type ChecksumCode

7 8

Target Address

R S O Reserved

A node sends Neighbor Advertisements in response to Neighbor Solicitationsand sends unsolicited Neighbor Advertisements in order to propagate new information quickly.

Options ...

Page 65: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

Neighbor AdvertisementFields

Type 136Code 0R Router flag. When set indicates that

the sender is a router.S Solicited flag. When set indicates that

the ad was sent in response to a Solicitation from the Destination address.

O Override flag. Indicates that the ad shouldoverride an existing cache entry.

Reserved 29-bit field that is unused.Target Address

The Target Address field in the Solicitation.Possible options:

Target link-layer address

Page 66: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

Redirect Message

Bit 0 15 16 31

Type ChecksumCode

7 8

Target Address

Routers send redirects to a host of a better first-hop.

Reserved

Options ...

Destination Address

Page 67: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

Redirect MessageFields

Type 137Code 0Reserved UnusedTarget Address An IP address that is a better first hop

to use for the ICMP Destination Address.Destination Address

The IP address of the destination whichis redirected to the target.

Possible options;Target link-layer address

Link-layer address for the target.Redirected Header

As much as possible of the IP packet that triggered the sending of the Redirect.

Page 68: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

IPv6 StatelessAddress Autoconfiguration

Creates link-local addressesVerifies its uniqueness on a linkDetermines what information should be autoconfiguredShould a stateful mechanism be used

(i.e. Is there a DHCP close at hand)

Requires no manual configuration of hostsMinimal configuration of routersNo additional hosts

Page 69: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

IPv6 StatelessAddress Autoconfiguration

Routers advertise prefixes the subnet associated with a link.Hosts generate an interface identifier.Combined generates an IPv6 compliant address.

With no router, hosts can generate link-local addresses.Good enough for communication among nodes attachedto the same link.

Page 70: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

IPv6 Address Leases

IPv6 addresses are leased to an interface – For a fixed length of time.– May be infinite

An address is valid within its lease time.Invalid otherwise.For graceful lease expiration the address goes through

2 phases– Preferred– Deprecated

Page 71: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

IPv6 Address Generation

Required when:

• The interface is initialized at system startup• Reinitialized after failure• Reinitialized after sys mgnt disables• Interface attaches to a link for the first time

Page 72: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

IPv6 Address Generation

Prepend the link-local prefix to the EUI-64 interface identifier.

FE80:0:0:0:Interface ID

Link-local addresses have infinite preferred and valid lifetimes

Page 73: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

IPv6 Address Uniqueness

Ipv6 addresses should be unique.The Duplicate Address Detection Algorithm is used.

The Duplicate Address Detection Algorithm uses– Neighbor Solicitation– Neighbor Advertisement

Possible DoS– Claim every address is a duplicate

Page 74: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

IPv6 AddressesPrivacy Considerations

Certain amount of surveillance can be performed ifSome part of your address remains constant over time.

Privacy advocates say bad, bad, bad.

Are you at the office or are you at home on a dialup, etc.

Page 75: IPv6 This will be real shortly Packet format Header format and contents Address space & allocation Header extensions Fragmentation ICMPv6 Security.

IPv6 AddressesRandomized

1) Take the history from the previous iteration and append it to the interface ID (IEEE 802 MAC address). If there is no previous history generate a random number

2) Compute the MD5 hash of the above.3) Take the left-most 64-bits. Set bit 6 to zero thus setting the

local/global bit indicating local. This is the interface ID.4) Take the right-most 64-bits of the hash is step 2) and sve them in

the history value for the next iteration.