Next Generation IP (IPv6 / IPng)
Next Generation IP (IPv6 / IPng)
The Next Generation IP, called IPv6 (Internet Protocol version 6) or IPng (IP new generation), was developed mainly because of the limitations of IPv4, especially the shortage of IPv4 addresses. It was proposed in the early 1990s to provide a much larger address space and to redesign the IP packet format and some supporting protocols.
1. Why IPv6 was introduced
The most important reason for introducing IPv6 was the limited address space of IPv4.
- IPv4 uses a 32-bit address.
- IPv6 uses a 128-bit address.
- Therefore, IPv6 provides an enormously larger address space.
- IPv4 also had limitations in its header design, option handling, resource allocation, and security support.
The IPv4 address depletion and other shortcomings as the motivation for developing IPv6.
Although IPv6 was designed as the long-term solution, the migration from IPv4 was slowed by techniques such as:
- Classless addressing
- DHCP
- NAT
These techniques extended the useful life of IPv4.
2. Major Changes in IPv6
The textbook identifies the following major changes.
| Feature | IPv6 |
|---|---|
| Address size | 128 bits |
| Header | New, simplified header |
| Options | Separated into extension headers |
| Extension | Designed to support future extensions |
| Traffic handling | Traffic Class and Flow Label |
| Security | Better support for authentication and encryption |
| Fragmentation | Performed only by source |
| Auxiliary protocol | ICMPv6 |
IPv6 provides a 128-bit address, compared with 32 bits in IPv4, giving an extremely large address space. Its new header format separates options from the basic header, making router processing simpler and faster.
3. IPv6 Packet Format
An IPv6 packet consists of:
The base header is fixed at 40 bytes. The payload can contain extension headers followed by data from protocols such as TCP or UDP.
Important IPv6 header fields
| Field | Size | Purpose |
|---|---|---|
| Version | 4 bits | Identifies IPv6; value = 6 |
| Traffic Class | 8 bits | Handles different delivery requirements |
| Flow Label | 20 bits | Identifies a particular flow |
| Payload Length | 16 bits | Length of payload excluding base header |
| Next Header | 8 bits | Identifies next extension header or upper-layer protocol |
| Hop Limit | 8 bits | Limits number of hops |
| Source Address | 128 bits | Address of source |
| Destination Address | 128 bits | Address of destination |
Important difference from IPv4
IPv4 has a variable-length header, whereas IPv6 has a fixed 40-byte base header.
Therefore, IPv6 does not need an IPv4-style Header Length field. The payload length field specifies only the payload length.
4. Extension Headers
One of the important changes in IPv6 is the use of extension headers.
In IPv4, options are included within the IP header. In IPv6, options are separated from the base header and placed in extension headers.
IPv6 Base Header | v Extension Header 1 | v Extension Header 2 | v TCP/UDP/ICMPv6 Data
The Next Header field identifies what comes next.
For example:
Next Header = TCP Next Header = UDP Next Header = ICMPv6 Next Header = Fragmentation
The textbook gives examples such as hop-by-hop options, source routing, fragmentation, encrypted security payload, authentication, and destination options.
Advantage
Most routers do not need to examine all options. Therefore, the basic packet processing can be simpler and faster.
5. Flow Label and Traffic Class
IPv6 introduces two important fields:
Traffic Class
The Traffic Class field is used to distinguish packets having different delivery requirements.
For example, different treatment may be required for:
- Normal data
- Real-time audio
- Video traffic
It replaces the Type of Service concept in IPv4.
Flow Label
The Flow Label is a 20-bit field used to identify a particular flow of packets.
A flow may consist of packets that:
- Follow the same path
- Require the same resources
- Require similar security
- Need similar treatment
A router can maintain a flow-label table and use the label to quickly determine how packets belonging to that flow should be handled.
Example
Consider an online video lecture:
Professor | | Video packets v IPv6 Network | +---- Flow Label = X | v Students
Routers can identify packets belonging to the same flow and provide appropriate treatment.
For real-time audio and video, resource reservation may also be used with protocols such as RTP and RSVP.
6. Fragmentation in IPv6
There is an important difference between IPv4 and IPv6 fragmentation.
IPv4
A router may fragment a datagram if necessary.
IPv6
Routers are not allowed to fragment packets.
Only the source can fragment the packet, and reassembly is performed at the destination.
The process is:
Source | | Check packet size | | Too large? v Fragment packet | v Routers | | Forward fragments v Destination | v Reassemble
If a router receives a packet that is too large for the next network's MTU, it drops the packet and sends a Packet Too Big ICMPv6 message back to the source.
Why?
Fragmentation at routers requires considerable processing. IPv6 avoids this to speed up router processing.
7. IPv6 Addressing
An IPv6 address is:
128 bits = 16 bytes
This is four times the length of an IPv4 address.
The enormous address space is:
The textbook emphasizes that this enormous space makes future address depletion essentially impossible.
8. IPv6 Address Notation
IPv6 normally uses colon hexadecimal notation.
The 128-bit address is divided into eight groups, with each group containing four hexadecimal digits.
Example:
FEF6:BA98:7654:3210:ADEF:BBFF:2922:FF00
Each hexadecimal digit represents 4 bits.
Therefore:
8 groups × 4 hexadecimal digits = 32 hexadecimal digits = 128 bits
Zero Compression
IPv6 addresses can contain many zeros.
Leading zeros within a group can be removed.
For example:
0074 → 74 000F → F 0000 → 0
Consecutive groups containing only zeros can be replaced by ::.
For example:
FDEC:0:0:0:0:BBFF:0:FFFF
can become:
FDEC::BBFF:0:FFFF
The :: compression can be used only once in an IPv6 address.
9. Types of IPv6 Addresses
IPv6 defines three major types:
IPv6 Address Types | +---- Unicast | +---- Anycast | +---- Multicast
1. Unicast
A unicast address identifies one interface.
Source ───────────> One Destination
The packet is delivered to that particular destination.
2. Anycast
An anycast address identifies a group of computers, but the packet is delivered to only one member of the group—the most reachable one.
+---- Server A | Source ------+---- Server B | +---- Server C
Only one server receives the packet.
This is useful when several servers can provide the same service.
3. Multicast
A multicast address identifies a group, and every member of the group receives a copy.
+---- Host A | Source ------+---- Host B | +---- Host C
All three group members receive the packet.
Important point
IPv6 does not define broadcast addressing. Broadcasting is treated as a special case of multicasting.
10. Global Unicast Address
The IPv6 global unicast block is:
2000::/3
It is used for normal one-to-one communication over the Internet.
A global unicast address is divided into three parts:
+-------------------+----------------+----------------------+ | Global Routing | Subnet | Interface | | Prefix | Identifier | Identifier | +-------------------+----------------+----------------------+ 48 bits 16 bits 64 bits
1. Global Routing Prefix
Identifies the organization/site and is used for routing through the Internet.
2. Subnet Identifier
Identifies a subnet within the organization.
With 16 bits, there can be:
subnets.
3. Interface Identifier
Identifies the interface of a particular device.
11. Important IPv6 Address Blocks
The textbook identifies several important blocks:
| Prefix | Purpose |
|---|---|
0000::/8 | Special addresses |
2000::/3 | Global unicast |
FC00::/7 | Unique local unicast |
FE80::/10 | Link-local addresses |
FF00::/8 | Multicast |
12. Special IPv6 Addresses
Some important special addresses are:
Unspecified Address
::/128
Used during bootstrap when a host does not yet know its own address.
Loopback Address
::1/128
Used for testing communication within the same host. Unlike IPv4, IPv6 uses a single loopback address.
13. IPv6 Multicast Addresses
IPv6 has a specific block for multicast addresses.
The multicast prefix is:
FF00::/8
A multicast address contains information about:
- Flags
- Scope
- Group ID
The flag indicates whether the multicast group is permanent or transient.
The scope specifies the range within which the multicast address is meaningful, such as link-local, organization-local, or global.
14. Transition from IPv4 to IPv6
IPv4 cannot be replaced suddenly because there are huge numbers of existing IPv4 systems.
Therefore, the transition must be gradual.
The textbook describes three transition strategies:
Transition Strategies | +---- Dual Stack | +---- Tunneling | +---- Header Translation
A. Dual Stack
A device runs both IPv4 and IPv6 simultaneously.
The host chooses IPv4 or IPv6 depending on the destination.
DNS can provide an IPv4 address or IPv6 address, allowing the source to determine which version to use.
B. Tunneling
Tunneling is used when two IPv6 systems need to communicate but an IPv4 network exists between them.
The IPv6 packet is encapsulated inside an IPv4 packet when it enters the IPv4 region.
At the other end, the IPv6 packet is removed from the IPv4 "capsule." The protocol value is set to 41 to indicate that the IPv4 packet is carrying an IPv6 packet.
C. Header Translation
This is required when an IPv6 sender communicates with an IPv4-only receiver.
The IPv6 header is converted into an IPv4 header so that the IPv4-only receiver can understand the packet.
15. ICMPv6
IPv6 uses ICMPv6 (Internet Control Message Protocol version 6).
ICMPv6 performs the functions of ICMPv4 and also incorporates functions that were provided by separate IPv4 protocols.
Thus, ICMPv6 combines functions associated with ICMP, ARP, and IGMP from IPv4.
ICMPv6 messages are divided into four groups:
- Error-reporting messages
- Informational messages
- Neighbor-discovery messages
- Group-membership messages
Important examples
Error reporting:
- Destination unreachable
- Packet too big
- Time exceeded
- Parameter problem
Informational:
- Echo request
- Echo reply
Neighbor discovery:
- Router solicitation
- Router advertisement
- Neighbor solicitation
- Neighbor advertisement
Group membership:
- Membership query
- Membership report
IPv4 vs IPv6 — Important Comparison
| Feature | IPv4 | IPv6 |
|---|---|---|
| Address size | 32 bits | 128 bits |
| Address space | ||
| Basic header | Variable length | Fixed 40 bytes |
| Header options | Part of header | Extension headers |
| TTL | TTL | Hop Limit |
| Service handling | Type of Service | Traffic Class + Flow Label |
| Fragmentation | Routers can fragment | Only source can fragment |
| Broadcast | Supported | Not defined |
| Multicast | Supported | Supported |
| Anycast | Not a standard IPv4 address type | Supported |
| Error/control | ICMP | ICMPv6 |
| Address resolution | ARP | Neighbor Discovery through ICMPv6 |
| Multicast membership | IGMP | ICMPv6 group-membership messages |
Conclusion
IPv6 is the next generation of the Internet Protocol, developed mainly to overcome the address-space limitation of IPv4. It uses 128-bit addresses, a fixed 40-byte base header, extension headers, traffic class and flow-label support, improved security support, and source-controlled fragmentation. IPv6 provides unicast, anycast, and multicast addressing and does not use broadcast. Since IPv4 and IPv6 cannot be replaced instantly, dual stack, tunneling, and header translation are used for gradual transition. ICMPv6 provides error reporting, information, neighbor discovery, and group-membership functions.
Comments
Post a Comment