Presentation is loading. Please wait.

Presentation is loading. Please wait.

2: Comparing IPv4 and IPv6 Rick Graziani Cabrillo College

Similar presentations


Presentation on theme: "2: Comparing IPv4 and IPv6 Rick Graziani Cabrillo College"— Presentation transcript:

1 2: Comparing IPv4 and IPv6 Rick Graziani Cabrillo College

2 For more information please check out my Cisco Press book and video series:
IPv6 Fundamentals: A Straightforward Approach to Understanding IPv6 By Rick Graziani ISBN-10: IPv6 Fundamentals LiveLessons: A Straightforward Approach to Understanding IPv6 By Rick Graziani ISBN-10:

3 2.1: Comparing the IPv4 and IPv6 Headers

4 Let’s Begin with the IPv6 Header
Similar fields Understanding IPv6 begins with the IPv6 header. IPv6 takes advantage of 64-bit CPUs. Several differences between IPv4 and IPv6 headers. IPv4 Simpler IPv6 header. Fixed 40 byte IPv6 header. Lets look at the differences… 64-bit memory word IPv6 Understanding IPv6 all begins with the IPv6 header. When we think about IPv6 we usually think of the header’s IPv6 address but as we will see there are many changes. Understanding the IPv6 header will help us understand some of the other functionality of IPv6. Drawn as 64 bits wide, unlike IPv4 which is typically shown as a 32 bit wide header. Designers of IPv6 decided to take advantage of 64-bit processing although back then 64-bit CPUs were not common. We will explore these similarities and differences throughout this lesson. 64-bit CPUs can read one 64-bit wide memory word at a time, so to take advantage of this processing IPv6 fields start at an even 64-bit boundary or a multiple of 64. 32-bit CPUs aren’t negatively affected because a 64-bit boundary is also a 32-bit boundary. We will examine the changes between these two headers. IPv4 header – lighter shaded fields have a field in IPv6 with the same or similar functionality. The darker shaded fields are ones that are not included in IPv6. IPv6 is simpler and is fixed length. We’ll talk more about this in a moment.

5 IPv6 Version IPv4 Version contains 4. IPv6 Version contains 6.
Internet Stream Protocol (ST2) IPv6 As mentioned in Lesson 1, in 1990 the Experimental Internet Stream Protocol (ST2) used the value of 5 for its IP protocol Version. Although it was never known as IPv5, when encapsulated in IP, it used the value of 5 for the IP Protocol version.

6 IPv4 Internet Header Length
IPv4 Internet Header Length (IHL) Length of IPv4 header in 32-bit words including any Options or Padding. IPv6 IHL for IPv6 is not needed. IPv6 header is fixed at 40 bytes. 1 2 3 4 5 ? IPv6 8 bytes 8 bytes 40 bytes = 8 bytes 8 bytes IPv4 IHL: This is the length of the IP header in 32-bit words, including any optional fields. This points to where the IP header ends and the data or payload begins. The minimum value is 5 (5 32-bit words or 160 bits or 20 bytes. This is equal to the minimum size of an IPv4 header, excluding any options or padding. The IPv6 header is fixed at 40 bytes which allows for faster processing by routers. 8 bytes

7 DiffServ Code Point (DSCP)
IPv6 Traffic Class IPv4 Type of Service IPv6 Traffic Class Not mandated by any IPv6 RFCs. Same functionality as IPv4. Uses same Differentiated Services technique (RFC 2474) as IPv4. IPv4 IPv6 7 6 5 4 3 2 1 IP Precedence Unsused DiffServ Code Point (DSCP) IP ECN <Afer IPv6 Traffic Class> This field specifies what type of treatment the packet should receive from routers. The ToS information helps provide quality of service (QoS) features by offering different degrees of precedence. <After Uses same Differentiated Services technique….> Original terminology of the IPv4 Type of Service has been superseded by the diffserv terminology used in RFC 2474 IPv6 uses the Differentiated Services technique specified in RFC 2474 RFC 2474 defines a technique called Differentiated Services (DS) Differentiated Services Code Point (DSCP) – most routers ignore this field but if you’re implementing QoS its good idea to be come familiar with it. (Kind of strange but kind of cool. Beyond this video though.  )

8 IPv6 Flow Label New field in IPv6 – not part of IPv4.
Flow label is used to identify the packets in a common stream or flow. Traffic from source to destination share a common flow label. RFC 6437 IPv6 Flow Label Specification IPv4 IPv6 <After: Flow label is used to identify…> The idea is…Tag a stream or flow of IPv6 packets sent from a source to one or more destination nodes. <After: Traffic from source to destination share a …> The Flow Label field is used to help identify all the packets within the same flow to ensure that all the packets receive the same type of handling by the IPv6 routers. Currently, there aren’t a lot of implementations that look at the flow label. However, many systems do set the flow label for packets that belong to different TCP sessions. A flow label of 0 means the flow label for that session is either not supported or not desired. Note to self: RFC: However, a flow is not necessarily 1:1 mapped to a transport connection…. As a general practice, packet flows should not be reordered, and the use of the Flow Label field does not affect this. In particular, a Flow label value of zero does not imply that reordering is acceptable.

9 IPv6 Extension Header (Optional)
IPv6 Payload Length IPv4 Header Data (Payload) IPv4 Total Length – Number of bytes of the IPv4 header (options) + data. IPv6 Payload Length – Number of bytes of the payload. Does not include the main IPv6 header. Includes extension headers + data IPv4 IPv6 Payload IPv6 Header IPv6 Extension Header (Optional) Data We will talk more about the extension header in a moment. IPv6 Payload length – The number bytes of the payload The data following the main IPv6 header If the IPv6 packet has one or more extension headers, they are included in the number of bytes contained in the Payload Length field. Extension headers are considered part of the payload. IPv4 header can vary in length because of Padding and Options fields IPv6 header is fixed at 40 bytes so the length of the entire IPv6 packet can easily be determined by add the 40 bytes. Extension headers will be introduced later in this lesson. These are headers which are optional and in addition to the main IPv6 header. Notice that Payload Length field is 16 bits, allowing a maximum payload size of 65,355 byes. IPv6 has a Jumbogram extension header to support larger packet sizes if needed. RFC 2675, IPv6 Jumbograms, specifies an additional 32-bit field to allow the transmission of IPv6 packets with payloads between 65,536 and 4,294,967,295 bytes. Because the Payload Length does not include the 40-byte IPv6 header there is a small efficiency gain. The receiving host or router does not have to check whether the packet is large enough to hold the IP header in the first place

10 IPv4 Fragmentation IPv4 fields used for fragmentation and reassembly.
Intermediate devices such as IPv6 routers do not perform fragmentation. Any fragmentation needed will be handled by the source using an extension header. IPv4 IPv6

11 IPv4 Fragmentation MTU of outgoing link smaller than packet size – fragment IPv4 packet. It is my job to reassemble the packet fragments. Link with smaller MTU PCA PCB R1 R2 R3 Destination Source 1 2 3 IPv4 Packet IPv4 Packet IPv4 Packet IPv4 Packet IPv4 Packet IPv4 requires that every link have a minimum MTU of 68 bytes. Every internet destination must be able to receive a packet of 576 bytes either in one piece or in fragments to be reassembled. IPv4 Packet IPv4 Packet IPv4 Packet RFC791: Every internet module must be able to forward a datagram of 68 octets without further fragmentation. This is because an internet header may be up to 60 octets, and the minimum fragment is 8 octets. Every internet destination must be able to receive a datagram of 576 octets either in one piece or in fragments to be reassembled.

12 IPv6 No Fragmentation MTU of outgoing link smaller than packet size. Drop packet. Send ICMPv6 Packet Too Big message, use MTU 1350. Packet received. No reassembly required. I will use MTU of the interface. MTU = 1500 MTU = 1500 MTU = 1350 MTU = 1500 PCA PCB R1 R2 Link with smaller MTU R3 Destination Source 1 IPv6 requires that every link have a minimum MTU of 1280 bytes, with a recommended MTU of 1500 bytes. Path MTU Discovery uses this same process. Because intermediate devices do not fragment packets, Path MTU Discovery is used when their links are greater than 1280. IPv6 Packet – MTU 1500 2 ICMPv6 Packet Too Big Use MTU 1350 3 RFC2460: IPv6 requires that every link in the internet have an MTU of 1280 octets or greater. On any link that cannot convey a 1280-octet packet in one piece, link-specific fragmentation and reassembly must be provided at a layer below IPv6. Path MTU discovery is discussed in the lesson XXX. RFC 1981 IPv6 nodes SHOULD implement Path MTU Discovery in order to discover and take advantage of paths with PMTU greater than the IPv6 minimum link MTU [IPv6-SPEC]. A minimal IPv6 implementation (e.g., in a boot ROM) may choose to omit implementation of Path MTU Discovery. Sending hosts discover the path MTU through the following process: The sending host assumes that the path MTU is the link MTU of the interface on which the traffic is being forwarded. The sending host sends IPv6 datagrams at the path MTU size. If a router on the path is unable to forward the packet over a link because the packet is larger than the link MTU, the router sends an ICMPv6 Packet Too Big message back to the sending host and discards the packet. PAThe Packet Too Big message contains the MTU of the link on which the forwarding failed. The sending host sets the path MTU for packets being sent to the destination to the value of the MTU field in the Packet Too Big message. IPv6 Packet MTU 1350

13 (Protocol: TCP, UDP, ICMPv6, etc.)
IPv6 Next Header IPv4 Protocol IPv6 Next Header For both protocols, the field indicates the type of header following the IP header. IPv4 Common values: 6 = TCP 17 = UDP 58 = ICMPv6 88 = EIGRP 89 = OSPF IPv6 IPv6 Header Next Header Data (Protocol: TCP, UDP, ICMPv6, etc.) The same values used in the IPv4 Protocol field are used in the IPv6 Next Header field along with additional values. IPv6 Next Header has additional values including for an extension header.

14 IPv6 Hop Limit IPv4 TTL (Time to Live) IPv6 Hop Limit
Renamed to more accurately reflect process. Set by source, every router in path decrements hop limit by 1. IPv4 When 0, drop packet. IPv6 Hop Limit makes sure packets are not roaming around the network forever – routing loop. This field is initialized with a suitable value at the origin of a packet and decremented by each router along the way. When the field reaches zero, the packet is dropped. Originally in IPv4 the idea was that the router should decrement, in seconds, that a packet is buffered in a router. But keeping track of how long packets are buffered was too difficult to implement so the number of routers was used instead.

15 IPv6 Source and Destination Addresses
IPv6 Source and Destination addresses have the same basic functionality as IPv4. IPv4 – 32-bit addresses. IPv6 – 128-bit addresses. Some significant changes in IPv6. IPv4 IPv6 Much more in later lessons

16 IPv4 Header Checksum IPv4 Header Checksum Not used in IPv6.
Upper-layer protocols generally have a checksum (UDP and TCP). So, in IPv4 the UDP checksum is optional. IPv4 Because it’s not in IPv6, the UDP checksum is now mandatory. IPv6

17 IPv4 Options and Padding
Not used in IPv6. Variable length, optional. IPv4 Options are handled using extension headers in IPv6. IPv4 Padding makes sure IPv4 options fall on a 32-bit boundary. IPv6 header is fixed at 40 bytes. IPv6 40 bytes = Fixed 40-byte header so padding is not needed. IPv4 – Options are rarely used - Do not really help and are blocked my many routers and fireswalls

18 (Protocol: TCP, UDP, ICMPv6, etc.)
IPv6 Extension Header Next Header identifies: The protocol carried in the data portion of the packet. The presence of an extension header. Extension headers are optional and follow the main IPv6 header. Provide flexibility and features to the main IPv6 header for future enhancements without having to redesign the entire protocol. Allows the main IPv6 header to have a fixed size for more efficient processing. IPv6 Main Header Next Header Extension Header Next Header Data (Protocol: TCP, UDP, ICMPv6, etc.) We won’t go into the details of extension headers here, but they can be used to provide: Fragementation by the source

19 Hop-by-Hop Extension Header
IPv6 Extension Header Next Header Value (Decimal) Extension Header Name Extension Header Description Hop-by-Hop Options Used to carry optional information, which must be examined by every router along the path of the packet. 43 Routing Allows the source of the packet to specify the path to the destination. 44 Fragment Used to fragment IPv6 packets. 50 Encapsulating Security Payload (ESP) Used to provide authentication, integrity, and encryption. 51 Authentication Header (AH) Used to provide authentication and integrity. 60 Destination Options Used to carry optional information that only needs to be examined by a packet’s destination node(s). IPv6 Main Header Next Header Hop-by-Hop Extension Header Next Header 51 AH Extension Header Next Header 6 TCP Header Data Immediately following the mandatory main IPv6 header, there can be zero, one, or several extension headers. A field common in all extension headers is another Next Hop field, which indicates whether another extension header is to follow, or the protocol of the data (payload) like a TCP segment. Therefore, the last extension header will always specify which protocol is encapsulated as the data or payload—again, similar to the Protocol field in IPv4.

20 2.2: A Brief Look at IPv6 Address Types

21 IPv6 Address Types More details in Lessons 3, 4, 5 & 6 IPv6 Addresses
Unicast Multicast Anycast Assigned Solicited Node FF00::/8 FF02::1:FF00:0000/104 Global Unicast Link-Local Loopback Unspecified Unique Local Embedded IPv4 2000::/3 FE80::/10 ::1/128 ::/128 FC00::/7 ::/80 RFC Default Address Selection for IPv6 (includes IPv4) Much more later in Lesson XXX

22 2.3: A Brief Look at ICMPv6 Neighbor Discovery

23 Internet Control Message Protocol for IPv6
ICMPv6 Internet Control Message Protocol for IPv6 ICMPv6 is defined in RFC 4443. Similar to ICMPv4, describes two types of messages: Informational Error ICMPv6 Neighbor Discovery is described in RFC 4861. Much more robust than ICMP for IPv4. Contains new functionality and improvements. More than just “messaging” but “how IPv6 conducts business”. IPv6 Main Header Next Header 58 ICMPv6 Header Data All ICMPv6 messages

24 ICMPv6 Neighbor Discover Protocol
ICMPv6 Neighbor Discovery defines 5 different packet types: Router Solicitation Message Router Advertisement Message Used with dynamic address allocation Neighbor Solicitation Message Neighbor Advertisement Message Used with address resolution (IPv4 ARP) Redirect Message Similar to ICMPv4 redirect message Router-to-Device messaging Router-Device Messaging Device-Device Messaging We will see this slides several times in other lessons as we discuss these messages types.

25 Router Solicitation & Router Advertisement Messages
ICMPv6 Neighbor Discovery defines 5 different packet types: Router Solicitation Message Router Advertisement Message Used with dynamic address allocation Neighbor Solicitation Message Neighbor Advertisement Message Used with address resolution (IPv4 ARP) Redirect Message Similar to ICMPv4 redirect message Router-to-Device messaging Router-Device Messaging Device-Device Messaging

26 Dynamic Address Allocation in IPv4
DHCPv4 Server 1 2 I need IPv4 addressing information. Here is everything you need. DHCPv4 server is a stateful server.

27 Dynamic Address Allocation in IPv6
To all IPv6 routers: I need IPv6 address information. I might not be needed. ICMPv6 Router Solicitation DHCPv6 Server ICMPv6 Router Advertisement To all IPv6 devices: Let me tell you how to do this … 1. SLAAC SLAAC (Stateless Address Autoconfiguration) 2. SLAAC with Stateless DHCPv6 Router Solicitations Router Advertisements The Router Advertisement (RA) tells hosts how it will receive IPv6 Address Information. Sent periodically by an IPv6 router or… … when the router receives a Router Solicitation (RS) message from a host. More options for devices to get addressing. The device doesn’t need to access a DHCPv6 server for addressing. It’s router, its default gateway is its way out of the network and everything it needs for addressing. Much more in lesson XXX 3. Stateful DHCPv6

28 Neighbor Solicitation & Neighbor Advertisement Messages
ICMPv6 Neighbor Discovery defines 5 different packet types: Router Solicitation Message Router Advertisement Message Used with dynamic address allocation Neighbor Solicitation Message Neighbor Advertisement Message Used with address resolution (IPv4 ARP) Redirect Message Similar to ICMPv4 redirect message Router-to-Device messaging Router-Device Messaging Device-Device Messaging Described in RFC 4443 Much more robust than ICMP for IPv4 Contains new functionality and improvements. More than just “messaging” but “how IPv6 conducts business”. General message similar to ICMP for IPv4 (Type and Code fields)

29 Address Resolution: IPv4 and IPv6
ARP Request: Broadcast IPv4: ARP over Ethernet Ethernet ARP Request/Reply ARP Cache Know IPv4, what is the MAC? My IPv4! Here is the MAC? 2 1 ARP Reply PCB ARP Request PCA 1 My IPv6! Here is the MAC? 2 Know IPv6, what is the MAC? Neighbor Advertisement Neighbor Solicitation Neighbor Cache IPv6: ICMPv6 over IPv6 over Ethernet Neighbor Solicitations Neighbor Advertisements NS: Multicast NS: Solicited Node Multicast Ethernet More about address resolution in Lesson X. More about Solicited Node Multicast in Lesson X and Y. IPv6 Header ICMPv6: Neighbor Solicitation/Advertisement

30 Router-Device Messaging Device-Device Messaging
Redirect Message ICMPv6 Neighbor Discovery defines 5 different packet types: Router Solicitation Message Router Advertisement Message Used with dynamic address allocation Neighbor Solicitation Message Neighbor Advertisement Message Used with address resolution (IPv4 ARP) Redirect Message Similar to ICMPv4 redirect message Router-to-Device messaging Router-Device Messaging Device-Device Messaging Described in RFC 4443 Much more robust than ICMP for IPv4 Contains new functionality and improvements. More than just “messaging” but “how IPv6 conducts business”. General message similar to ICMP for IPv4 (Type and Code fields)

31 ICMPv6 Redirect Network X Similar functionality as ICMPv4.
Destination: PCB Destination: Network X Host IPv6 Network A IPv6 Network B PCA PCB Similar functionality as ICMPv4. Like IPv4, a router informs an originating host of the IP address of a router that is on the local link and is closer to the destination. Unlike IPv4, a router informs an originating host that the destination host (on a different prefix/network) is on the same link as itself. Redirect Function Routers use the redirect function to inform originating hosts of a better first-hop neighbor to which traffic should be forwarded for a specific destination. Routers use the redirect function for two purposes: A router informs an originating host of the IP address of a router available on the local link that is closer to the destination. The term closer is a routing metric function used to reach the destination network segment. This condition can occur when multiple routers are on a network segment, the originating host chooses a default router, and it is not the best one to use to reach the destination. A router informs an originating host that the destination is a neighbor (it is on the same link as the originating host). This condition can occur when the prefix list of a host does not include the prefix of the destination. Because the destination does not match a prefix in the list, the originating host forwards the packet to its default router. The following steps occur in the IPv6 redirect process: The originating host sends a unicast packet to its default router. The router processes the packet and notes that the address of the originating host is a neighbor. Additionally, the router notes that both the originating host and the next-hop are on the same link. The router forwards the packet to the appropriate next-hop address. The router sends the originating host a Redirect message. In the Target Address field of the Redirect message is the next-hop address of the node to which the originating host should send packets addressed to the destination. For packets redirected to a router, the Target Address field is set to the link-local address of the router. For packets redirected to a host, the Target Address field is set to the destination address of the packet originally sent. The Redirect message includes the Redirected Header option. The message might also include the Target Link-Layer Address option. 5. Upon receiving the Redirect message, the originating host updates the destination address entry in the destination cache with the address in the Target Address field. If the Redirect message includes the Target Link-Layer Address option, its contents are used to create or update the corresponding entry in the neighbor cache. Only the first router in the path between the originating host and the destination sends redirect messages, and (like ICMPv6 error messages) they are rate limited. Hosts never send Redirect messages, and routers never update routing tables based on the receipt of a Redirect message.

32 ICMPv6 Neighbor Discover Protocol
ICMPv6 Neighbor Discovery defines 5 different packet types: Router Solicitation Message Router Advertisement Message Used with dynamic address allocation Neighbor Solicitation Message Neighbor Advertisement Message Used with address resolution (IPv4 ARP) Redirect Message Similar to ICMPv4 redirect message Router-to-Device messaging Router-Device Messaging Device-Device Messaging More details in Lessons 7, 8 & 10 More in Lesson X and other lessons.

33 For more information please check out my Cisco Press book and video series:
IPv6 Fundamentals: A Straightforward Approach to Understanding IPv6 By Rick Graziani ISBN-10: IPv6 Fundamentals LiveLessons: A Straightforward Approach to Understanding IPv6 By Rick Graziani ISBN-10:

34 2: Comparing IPv4 and IPv6 Rick Graziani Cabrillo College


Download ppt "2: Comparing IPv4 and IPv6 Rick Graziani Cabrillo College"

Similar presentations


Ads by Google