IPv6 in IPv4 (6to4)报文格式
RFC3056定义了6to4隧道。6to4隧道是IETF较为重视并得到深入研究的有广阔应用前景的一种网络过渡机制,可以使连接到纯IPv4网络上的孤立IPv6子网或IPv6站点与其他同类站点在尚未获得纯IPv6连接时彼此间进行通信。
在IPv4网络内可以采用多种路由协议(OSPF、BGP、RIP、IS-IS等),在两个6to4域之间可以通过MP-BGP路由方式实现路由可达。
一、IPv6 in IPv4 (6to4)报文格式
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Version| IHL |Type of Service| Total Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Identification |Flags| Fragment Offset |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Time to Live | Protocol 41 | Header Checksum |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Source Address |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Destination Address |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Options | Padding |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| IPv6 header and payload ... /
+-------+-------+-------+-------+-------+------+------+
二、IPv6 in IPv4 (6to4)报文示例
Frame 1: 134 bytes on wire (1072 bits), 134 bytes captured (1072 bits)
Arrival Time: Jun 24, 2008 19:59:07.487397000
Epoch Time: 1214308747.487397000 seconds
[Time delta from previous captured frame: 0.000000000 seconds]
[Time delta from previous displayed frame: 0.000000000 seconds]
[Time since reference or first frame: 0.000000000 seconds]
Frame Number: 1
Frame Length: 134 bytes (1072 bits)
Capture Length: 134 bytes (1072 bits)
[Frame is marked: False]
[Frame is ignored: False]
[Protocols in frame: eth:ip:ipv6:icmpv6:data]
[Coloring Rule Name: ICMP]
[Coloring Rule String: icmp || icmpv6]
Ethernet II, Src: c2:00:42:02:00:00 (c2:00:42:02:00:00), Dst: c2:01:42:02:00:00 (c2:01:42:02:00:00)
Destination: c2:01:42:02:00:00 (c2:01:42:02:00:00)
Address: c2:01:42:02:00:00 (c2:01:42:02:00:00)
.... ...0 .... .... .... .... = IG bit: Individual address (unicast)
.... ..1. .... .... .... .... = LG bit: Locally administered address (this is NOT the factory default)
Source: c2:00:42:02:00:00 (c2:00:42:02:00:00)
Address: c2:00:42:02:00:00 (c2:00:42:02:00:00)
.... ...0 .... .... .... .... = IG bit: Individual address (unicast)
.... ..1. .... .... .... .... = LG bit: Locally administered address (this is NOT the factory default)
Type: IP (0x0800)
Internet Protocol Version 4, Src: 10.0.0.1 (10.0.0.1), Dst: 10.0.0.2 (10.0.0.2)
Version: 4
Header length: 20 bytes
Differentiated Services Field: 0x00 (DSCP 0x00: Default; ECN: 0x00: Not-ECT (Not ECN-Capable Transport))
0000 00.. = Differentiated Services Codepoint: Default (0x00)
.... ..00 = Explicit Congestion Notification: Not-ECT (Not ECN-Capable Transport) (0x00)
Total Length: 120
Identification: 0x0009 (9)
Flags: 0x00
0... .... = Reserved bit: Not set
.0.. .... = Don't fragment: Not set
..0. .... = More fragments: Not set
Fragment offset: 0
Time to live: 255
Protocol: IPv6 (41)
Header checksum: 0xa751 [correct]
[Good: True]
[Bad: False]
Source: 10.0.0.1 (10.0.0.1)
Destination: 10.0.0.2 (10.0.0.2)
Internet Protocol Version 6, Src: 2001:db8:0:1::1 (2001:db8:0:1::1), Dst: 2001:db8:0:1::2 (2001:db8:0:1::2)
0110 .... = Version: 6
[0110 .... = This field makes the filter "ip.version == 6" possible: 6]
.... 0000 0000 .... .... .... .... .... = Traffic class: 0x00000000
.... 0000 00.. .... .... .... .... .... = Differentiated Services Field: Default (0x00000000)
.... .... ..0. .... .... .... .... .... = ECN-Capable Transport (ECT): Not set
.... .... ...0 .... .... .... .... .... = ECN-CE: Not set
.... .... .... 0000 0000 0000 0000 0000 = Flowlabel: 0x00000000
Payload length: 60
Next header: ICMPv6 (0x3a)
Hop limit: 64
Source: 2001:db8:0:1::1 (2001:db8:0:1::1)
Destination: 2001:db8:0:1::2 (2001:db8:0:1::2)
Internet Control Message Protocol v6
Type: Echo (ping) request (128)
Code: 0
Checksum: 0x7e8f [correct]
Identifier: 0x18dc
Sequence: 0
Data (52 bytes)
Data: 000102030405060708090a0b0c0d0e0f1011121314151617...
[Length: 52]
三、IPv6 in IPv4 (6to4)协议栈结构
+----------------------+
| IPv6 payload |
+----------------------+
| IPv6 Header |
+----------------------+
| IPv4 Header |
+----------------------+
| L2 Frame Header |
+----------------------+
发表评论