TechKnowSurge
Cisco CCNA 1.8 Cisco CCNA 1.9 Cisco CCST Networking 2.3 Cisco CyberOps Associate 4.8 CompTIA Network+ 3.4 Cisco CCST Cybersecurity 2.1
VideoNetworkFree

IPv6 Packet Headers

The IPv6 header uses a fixed 40-byte structure with fewer fields than IPv4, making it more efficient to process at each network hop. Key differences include the removal of checksums and fragmentation support, the addition of a flow label field, and 128-bit source and destination addresses.

Complete this video to capture a CTF flag worth 1 point.

About this video

The IPv6 packet header is fixed at 40 bytes, which contrasts with the variable-length IPv4 header that grows depending on which options are present. Although the IPv6 header is physically larger overall, that size is driven primarily by the 128-bit source and destination address fields required to support the vastly expanded IPv6 address space. The fixed-length design eliminates much of the per-hop computation that IPv4 routing demands, and optional or extended functionality is handled through extension headers appended after the core header rather than embedded within it. Several IPv4 fields carry over into IPv6 under new names or with refined scope. The Time to Live field becomes the Hop Limit, which decrements by one at each Layer 3 device and drops the packet when it reaches zero, preventing routing loops from saturating the network. The DSCP and ECN bits are consolidated into the Traffic Class field, preserving quality-of-service and congestion-notification functionality. The Total Length field is replaced by Payload Length, which reports only the size of the data being carried rather than the entire packet. The Next Header field identifies the Layer 4 protocol following the IPv6 header, or signals the presence of an extension header when additional functionality is needed. Two significant IPv4 capabilities are absent from IPv6. There is no header checksum, which in IPv4 required recalculation at every router hop as the TTL decremented. IPv6 offloads integrity verification to higher-layer protocols and to the destination, reflecting the greater reliability of modern network infrastructure. Packet fragmentation is also removed from the core protocol; IPv6 relies on path MTU discovery rather than mid-path fragmentation by routers. These omissions, combined with the fixed-length header structure, substantially reduce the CPU overhead required to forward IPv6 packets and are central to the protocol's improved scalability and performance over IPv4.

What you'll learn

What's covered

IPv6 Packet Header

Aligned to

Cisco CCNA
1.8 Configure and verify IPv6 addressing and prefix
1.9 Describe IPv6 address types
Cisco CCST Networking
2.3 Identify IPv6 addresses and prefix formats
Cisco CyberOps Associate
4.8 Interpret the fields in protocol headers as related to intrusion analysis
CompTIA Network+
3.4 Given a scenario, implement IPv4 and IPv6 network services
Cisco CCST Cybersecurity
2.1 Describe TCP/IP protocol vulnerabilities

Key terms

Internet Protocol
IP
The principal communications protocol for routing packets across network boundaries.
Packet
A unit of data formatted for transmission over a network, containing a header, payload, and sometimes a trailer.
Payload
The actual data content of a packet or message, excluding headers and metadata.
Time to Live
TTL
A value in a packet that limits its lifespan on a network, preventing it from circulating indefinitely.
IPv6 Header
A fixed-length 40-byte header used in IPv6 packets, containing fields such as version, traffic class, flow label, payload length, next header, hop limit, and source and destination addresses.
Flow Label
A 20-bit field in the IPv6 header used to identify and group related packets that belong to the same traffic flow.
Hop Limit
A field in the IPv6 header that starts at a value set by the sender and is decremented by one at each router; when the value reaches zero the packet is discarded and an ICMPv6 error is sent to the source. The hop limit serves the same loop-prevention purpose as the TTL field in IPv4.
Next Header
An IPv6 header field that identifies the type of header immediately following the IPv6 header, typically indicating the Layer 4 protocol such as TCP or UDP.
Traffic Class
An 8-bit IPv6 header field used for quality of service and congestion notification, equivalent to the DSCP and ECN fields in IPv4.

Transcript

The IPv6 Header

One thing that's different about an IPv6 header than an IPv4 header is that the IP header is a fixed length, and so it's 40 bytes. Although there are some extensions which allow it to extend with some additional information, for the most part one of the efficiencies with IPv6 and the header in IPv6 is that it has a fixed length with it, and it's 40 bytes.

And so then we see that the payload could be anywhere from 0 to 460, which makes sense. If our maximum transmission unit is 1500, then 460 plus our 40 bytes adds up to our 1500. So there you have our header right there. If we had jumbo frames turned on, because of the field that allows us to specify the size of the packet, we could actually go up to 65,536 bytes. And so it could be much larger, but typically we have a maximum transmission unit of 1500.

Comparing the IPv4 and IPv6 Headers

Here's what the IPv4 header looks like versus an IPv6 header. I've got the IPv4 down here on the bottom versus the IPv6. So we actually see that the header of the IPv4 is smaller, without the options, if the options are not included, than the IPv6 header. But there are some efficiencies that come in with an IPv6 header, which makes it much more efficient.

Here's an example of the IPv4 header. And just as a real little refresher, each one of these boxes here is a bit. And so these eight bits make up a byte. So the rectangle box right here represents a byte of information. So the version would then be four bits. We have four bits that are in here, so those are the four bits for version. And then we have the IHL. I'm not going to go into all of these, but these are the zero through third byte, the fourth through the seventh byte. So each line is four bytes long.

So here's an IPv6 header. We see the same formatting that I have for each of those diagrams. In this case right here, we see that there's a lot fewer fields in here, but the source IP address and destination IP address take up a lot more space on there. And that's because it takes up 128 bits, so they're much, much larger. The whole header is much larger, but because it's a fixed length and because it eliminates some of the unnecessary fields in here, it's actually much more efficient in the way it operates.

Field-by-Field Differences

Here's a side-by-side example of what the difference is between those IPv4 headers and those IPv6 headers. Some of the fields are the same: the version field and the source and destination addresses are the same. And then we see that there are some name changes and a little bit different, and possibly some little difference in functionality.

So the total length has become the payload length. Total length would include the header, versus the payload length is just the payload that it's carrying. We see the DSCP and the ECN is now the traffic class, although the functionality between these bits and these bits is pretty much the same. We see a time to live and a hop limit, and same thing, the concept there is the same. We have a protocol and a next header, which delivers some of the same information. And then we've eliminated some fields: these are fields involved in IPv4 that are no longer involved in IPv6. And then we have added the flow label, that's on IPv6.

So we see some variance in the fields that we have. There's a lot of similarities between this. One of the things I'll call out is that we do see that some of these have to deal with fragmentation, and that is not within IPv6. So IPv6 doesn't have the same mechanisms to fragment the packets.

Another huge call-out is that there's no checksum that happens. If you recall what would happen, as the IPv4 packet would go from router to router, then the time to live would decrement and the checksum would have to be recalculated, and then it would be sent to the next location, and the checksum would verify that the packet is still good, and then it would have to decrement once again the time to live and then recalculate that checksum. So there's a lot of processing that happened every time it hit one of these routers.

Well, you don't have that in IPv6. You still have the hop limit, so it still counts down, but you don't have the checksum that happens to verify that it's okay. So what happens, and how do we know that the packet is good? Well, once it's delivered to wherever it's going, then at that point in time there would be some sort of verification that the data is still good. So that still happens. It just doesn't happen at the layer three level. And really, our communication is not riddled with as many errors and issues as it used to be. Our equipment is able to process things much cleaner as we've progressed and as we've developed these technologies and these protocols.

Summary of the Differences

In summary, we would say IPv4 is shorter versus IPv6 is longer. However, that's compensated by the fact that IPv4 is more complex, and so there is more processing involved, and IPv6 is much simpler.

  • IPv4 can vary in its length depending on what options are available to it, versus IPv6 is a fixed length, although there are extensions to IPv6. So there are some capabilities to add information; it just doesn't add it to the core header.
  • There is a checksum with IPv4 and no checksum with IPv6, like we just talked about.
  • There's fragmentation that can happen within IPv4. There's no fragmentation within IPv6 - there's no mechanism to fragment those.
  • What that all boils down to is that IPv4 has a longer processing time. It takes more CPU power to process it, versus IPv6 is much shorter.

Walking the IPv6 Header Fields

Just a quick recap of how these headers are set up. This is the IPv6 header. Each one of these squares represents the bits. The top represents the bytes. If we were to count 1, 2, 3, 4, 5, 6, 7, 8, sure enough, there's eight bits per byte. And then the 0 through 3 is the 0 through 3 byte. This is the fourth through the seventh byte. And then here are the bytes associated with the source IP, and here are the bytes associated with the destination IP.

The first field that we run across is the version. This is the same in IPv4 and IPv6, although IPv4 would have a 0 1 0 0, which translates to four, versus an IPv6 would have a 0 1 1 0, which translates to six. So that's what you would see, a 0 1 1 0, when you're talking about IPv6.

The next field that we have is the traffic class field, and this is broken into two different parts. Even though it's been renamed, essentially the first part is just like an IPv4. So the first six bits are the DSCP field, or what is known as the differentiated service field. And the second two bits then is the ECN. ECN is to notify of congestion. If there's any congestion on the line, then it is some signaling that can happen back and forth between two layer three devices to let the other device know that there's some congestion that's happening. Versus the differentiated service field allows it to identify things like quality of service or management traffic. So it can identify some of the traffic, and what it will help essentially the router or the layer 3 device be able to identify is what the priority of this packet is.

The next 20 bits in this header is what's called the flow label field. What the flow label does is identify a group of packets that belong together. So an example of this is if these were all zero through here, then that means that it doesn't actually correspond with any other packets that are associated with this. So it can associate different packets with each other.

The next field that we see is the payload length. The payload length is going to identify how big the payload that this packet is carrying. And so this is measured in bytes, so however many bytes there are would be written in here. And since we know that the maximum transmission unit is usually 1,500, then this would be only partially filled. We actually could go - this could identify a much larger packet size. In fact, since there's 16 bits, it could go up to 65,536. So this just identifies how big of a payload this packet is carrying.

The next field that we find is the next header field. What the next header field is going to do is tell each device, each router, each stop of the way - it's going to tell it what is found beyond the header, what it should expect beyond the header. So typically what this is is the layer 4 header. The layer 4 header is typically found after the IPv6 header, and so it will identify: is this TCP, is this UDP? And those version numbers that it specifies in this next header is the same as you would see in the IPv4 packet header. However, one exception to this is if you have any kind of extensions. IPv6 does allow you to have some extensions, which gives some additional functionality. And so if there is an extension down there, then this next header would identify that there's an extension to this IPv6 header. So for the most part, just think of this as identifying the layer 4 protocol, but there are a few exceptions to that.

The next field that we have is the hop limit. The hop limit in an IPv6 header is similar to the time to live on IPv4. Now, if you recall, there are times when you have a router that will forward a packet on to another router, but that router can then mistakenly think that that packet needs to be forwarded back to the original router. This happens when not all the routers on a network have the same routing information, and it creates this loop, and that packet could be sent back and forth indefinitely. Obviously that's going to cause a problem if you consistently get packets in there, and that's going to really bog down these routers. So we need some sort of mechanism that says, oh, this packet has been passed off too many times, so now we need to kill this packet, we need to let this packet go.

And so that is what the hop limit does. Every time it goes from one layer three device to another layer three device, it will decrement that value by one. And then once it gets down to zero, then it will kill the packet, and that packet will no longer be allowed to progress on. So therefore it would stop any loops from happening - or at least it won't stop the loop from happening, but it'll stop a packet from bringing that circuit down because it continually gets looped within that network.

Then we have the source IP address and destination IP address. Each of these take up 128 bits, so this is a significant portion of what the IPv6 header is taken up through the source IP address and destination IP address. And remember, within layer 2 our MAC addresses, our source and destination MAC addresses or layer 2 addresses, will change as it goes from one location to the next. But when it comes to an IPv6 header right here, these source IP addresses and destination IP addresses do not change. That means if you're communicating to the rest of the world, you're using your GUA, your global unicast address. And that global unicast address that is in here will not change. The global unicast address that's on your machine is the same thing that will be seen on the other location. When this packet gets to its final destination, it will see your global unicast address.

About TechKnowSurge

TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.

Explore free tools and programs →