TCN IPv4 Frame and IPv6
TCN IPv4 Frame and IPv6
Total Length
This 16-bit field defines the entire packet size in bytes, including header and data. The
minimum size is 20 bytes (header without data) and the maximum is 65,535 bytes.
Identification
Identification field uniquely identifies each datagram sent by a host. It is normally incremented
by one each time a host sends a datagram. Very useful for fragmentation and reassembly.
Flags
A three-bit field follows and is used to control or identify fragments. They are (in order, from
most significant to least significant):
• bit 0: Reserved; must be zero.
• bit 1: Don't Fragment (DF)
• bit 2: More Fragments (MF)
Fragment Offset
The fragment offset field is measured in units of eight-byte blocks. It is 13 bits long and
specifies the offset of a particular fragment relative to the beginning of the original
unfragmented IP datagram.
Time To Live (TTL)
An eight-bit time to live field helps prevent datagrams from persisting (e.g. going in
circles) on an internet. This field limits a datagram's lifetime. Every router decrements
TTL by 1 before sending it forward. If TTL reaches 0 the datagram is dropped and an
ICMP message is sent to the host application.
Protocol
Identifies the protocol that sent the datagram. The protocol (today) can be ICMP,
IGMP, TCP, UDP and OSPF.
Header Checksum
The 16-bit IPv4 header checksum field is used for error-checking of the header
Source address
This field is the IPv4 address of the sender of the packet. Note that this address may
be changed in transit by a network address trabslation device.
Destination address
This field is the IPv4 address of the receiver of the packet. As with the source address,
this may be changed in transit by a network address translation device.
Options
The options field is not often used.
IPv6 Overview
Note
19.7
Figure 19.14 IPv6 address in binary and hexadecimal colon notation
19.8
Figure 19.15 Abbreviated IPv6 addresses
19.9
The IPv6 Address
An IPv6 address is 128 bits in length and is written as eight groups
of four hexadecimal digits.
Each group is separated from the others by colons (:) as shown in
figure 1.
Hexadecimal characters are not case sensitive, therefore an address
can be written either in uppercase or lowercase, both are equivalent.
It is obvious that IPv6 addresses are long and hard to remember and work with.
That's why there are rules that can significantly shorten the address
Shortening IPv6 addresses
There are two rules, described in RFCs 2373 and 5952,
that help engineers to reduce the length of the address
representation.
It's important to understand from the very beginning that
using these two rules shortens only the representation
of the address, the address itself is always 128 bits.
Rule 1: Omit groups of all zeros
The first rule that we are going to look at is called Zero Compression. It says that a
double colon (::) can replace a single, contiguous string of one or more groups
consisting of all 0s. Example 1 illustrates the use of this rule.
Contd..
There are two contiguous strings of zeros - Group 4 and 5, and
Group 7. Having in mind that we can use only one double
colon, we can either replace groups 4 and 5 with :: or group 7,
but not both.
Common Mistakes
There are several common mistakes people make when they start applying these techniques. Let's look at
several examples and highlight the key points.
IPv6 address 2001:0cb0:0000:0000:0fc0:0000:0000:0abc Correctly Shortened 2001:cb0::fc0:0:0:abc
2001:cb0:0:0:fc0::abc Common Mistake 1 - using :: twice 2001:cb0::fc0::abc Common Mistake 2 -
removing trailing zeros 2001:cb::fc:0:0:abc
Example 19.11
Solution
We first need to align the left side of the double colon to
the left of the original pattern and the right side of the
double colon to the right of the original pattern to find
how many 0s we need to replace the double colon.
19.14
Net ID and Host ID in IPV6
In IPv6, the concept of network ID and host ID differs from the traditional
IPv4 scheme: