免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1106 | 回复: 0
打印 上一主题 下一主题

IPv6 Note [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-11-01 00:33 |只看该作者 |倒序浏览

                                                                                                Matrix between IPv4 and IPv6

IPv4
IPv6
address length
32 bits
128 bits
fix header length
20 octets
40 octets
fragmentation
yes
no, use discovery process to get MTU(per 5 minutes)
checksum
yes
no, link-layer more reliable
other fields
option
extension headers
IPsecurity
optional
mandatory
Mobility
no
builtin
broadcast
yes
no



IPv6 address
============
Colons separate entries in a series of 16-bit hexadecimal fields that represent IPv6 addresses. The hexadecimal digits A, B, C, D, E, and F represented in IPv6 are case-insensitive.
IPv6 does not require explicit address string notation. Use the following guidelines for IPv6 address string notations:
  • The leading zeros in a field are optional, so that 09C0 = 9C0 and 0000 = 0.
  • Successive fields of zeros can be represented as “::” only once in an address.
  • An unspecified address is written as “::” because it contains only zeros.
Using the “::” notation greatly reduces the size of most addresses. For example, FF01:0:0:0:0:0:0:1 becomes FF01::1.
IPv6 address type
=============
1. Unicast address
IPv6 global unicast address is composed of 48-bit global routing prefix, 16-bit subnet ID, 64-bit interface ID. It is 1/8 of all IPv6 address. 2000/3 (00100000::/3) Aggregatable

site-local: FEC0::/10(FEC0::/48)

site-local address is just similar to ipv4 private addresses.
link-local: FE80::/10 (1111111010000000::/10) (FE80::/64)
link-local is similar to Automatic Private IP Addressing (APIPA) IPv4 addresses (using the 169.254.0.0/16 prefix).
  • Link-local addresses are used for automatic address configuration, neighbor discovery, and router discovery. Link-local addresses are also used by many routing protocols.
  • Link-local addresses can serve as a way to connect devices on the same local network without needing global addresses.
  • When communicating with a link-local address, you must specify the outgoing interface because every interface is connected to FE80::/10.
loopback: ::1/128
unicast unspecified address: ::/128
each interface must have one loopback and one link-local address in IPv6.every interface can have multiple addresses of any type.every interface can have only one link-local addresses.
Unicast refer:
http://technet2.microsoft.com/WindowsServer/en/library/35f53389-3627-4bb8-afdc-0c31f9bdff6c1033.mspx?mfr=true
2. Multicast address
FF00::/8 (1111 1111) ~ FF0F::/8

Flag:  0 permanent
        1 temporary
Scope: 1 interface-local
        2 link-local
        3 subnet-local
        4 admin-local
        5 site-local
       8 Organization
        E global
  • FF02::1 — All nodes on link (link-local scope)
  • FF02::2 — All routers on link
  • FF02::9 — All Routing Information Protocol (RIP) routers on link
  • FF02::1:FFXX:XXXX — Solicited-node multicast on link, where XX:XXXX is the rightmost 24 bits of the corresponding unicast or anycast address of the node. (Neighbor solicitation messages are sent on a local link when a node wants to determine the link-layer address of another node on the same local link, similar to Address Resolution Protocol [ARP] in IPv4.)
  • FF05::101 — All Network Time Protocol (NTP) servers in the site (site-local scope)

3. Anycast address
anycast address is an address identifying many nodes. sending to an anycast address cause the packet to be sent to closest router using anycast address.
               
               
                anycast address cannot be used as source address. unicast and anycast share same address format. So if an unicast address is assigned to several interfaces, it goes to anycast.
Nodes use anycast addresses must explicitely be configured to know this is an anycast address.
Interface ID
============
Addresses with a prefix of 2000::/3 (001) through E000::/3 (111), with the exception of the FF00::/8 (1111 1111) multicast addresses, are required to have 64-bit interface identifiers in the extended universal identifier (EUI)-64 format. Thus, all unicast global address, link-local, site-local need int ID.
The last 64 bits of an IPv6 address are the interface identifier
that is unique to the 64-bit prefix of the IPv6 address. The ways in
which an interface identifier is determined are as follows:

RFC
2373 states that all unicast addresses that use the prefixes 001
through 111 must also use a 64-bit interface identifier that is derived
from the Extended Unique Identifier (EUI)-64 address.

RFC 3041 describes a randomly-generated interface identifier that changes over time to provide a level of anonymity.

An
interface identifier that is assigned during stateful address
autoconfiguration (for example, through DHCPv6). DHCPv6 standards are
currently being defined. The IPv6 protocol for the Windows Server 2003
family and Windows XP does not support stateful address configuration
or DHCPv6.

An interface identifier that is manually configured.
EUI-64 interface identifier is derived from IEEE 802 MAC address.
IEEE 802 addresses
Traditional interface
identifiers for network adapters use a 48-bit address called an IEEE
802 address. This address consists of a 24-bit company ID (also called
the manufacturer ID), and a 24-bit extension ID (also called the board
ID). The combination of the company ID, which is uniquely assigned to
each manufacturer of network adapters, and the board ID, which is
uniquely assigned to each network adapter at the time of assembly,
produces a globally unique 48-bit address. This 48-bit address is also
called the physical, hardware, or media access control (MAC) address.

Art Image
Defined bits within the IEEE 802 address are the following:

Universal/Local (U/L)  
The
U/L bit is the seventh bit of the first byte and is used to determine
whether the address is universally or locally administered. If the U/L
bit is set to 0, the IEEE, through the designation of a unique company
ID, has administered the address. If the U/L bit is set to 1, the
address is locally administered. The network administrator has
overridden the manufactured address and specified a different address.

Individual/Group (I/G)  
The
I/G bit is the low order bit of the first byte and is used to determine
whether the address is an individual address (unicast) or a group
address (multicast). When set to 0, the address is a unicast address.
When set to 1, the address is a multicast address.
For
a typical 802.x network adapter address, both the U/L and I/G bits are
set to 0, corresponding to a universally administered, unicast MAC
address.
IEEE EUI-64 addresses
The IEEE EUI-64
address represents a new standard for network interface addressing. The
company ID is still 24-bits in length, but the extension ID is 40 bits,
creating a much larger address space for a network adapter
manufacturer. The EUI-64 address uses the U/L and I/G bits in the same
way as the IEEE 802 address.

Art Image
Mapping IEEE 802 addresses to EUI-64 addresses
To
create an EUI-64 address from an IEEE 802 address, the 16 bits of
11111111 11111110 (0xFFFE) are inserted into the IEEE 802 address
between the company ID and the extension ID. The following illustration
shows the conversion of an IEEE 802 address to an EUI-64 address.

Art Image
Mapping EUI-64 addresses to IPv6 interface identifiers
To
obtain the 64-bit interface identifier for IPv6 unicast addresses, the
U/L bit in the EUI-64 address is complemented (if it is a 1, it is set
to 0; and if it is a 0, it is set to 1). The following illustration
shows the conversion for a universally administered, unicast EUI-64
address.

Art Image
To
obtain an IPv6 interface identifier from an IEEE 802 address, you must
first map the IEEE 802 address to an EUI-64 address, and then
complement the U/L bit. The following illustration shows the conversion
process for a universally administered, unicast IEEE 802 address.

Art Image
IEEE 802 address conversion example
Host
A has the Ethernet MAC address of 00-AA-00-3F-2A-1C. First, it is
converted to EUI-64 format by inserting FF-FE between the third and
fourth bytes, yielding 00-AA-00-FF-FE-3F-2A-1C. Next, the U/L bit,
which is the seventh bit in the first byte, is complemented. The first
byte in binary form is 00000000. When the seventh bit is complemented,
it becomes 00000010 (0x02). The final result is 02-AA-00-FF-FE-3F-2A-1C
which, when converted to colon-hexadecimal notation, becomes the
interface identifier 2AA:FF:FE3F:2A1C. As the result, the link-local
address that corresponds to the network adapter with the MAC address of
00-AA-00-3F-2A-1C is FE80::2AA:FF:FE3F:2A1C.
Note

When
complementing the U/L bit, add 0x2 to the first byte if the EUI-64
address is universally administered, and subtract 0x2 from the first
byte if the EUI-64 address is locally administered.
转载自:
http://technet2.microsoft.com/WindowsServer/en/library/35f53389-3627-4bb8-afdc-0c31f9bdff6c1033.mspx?mfr=true
ICMPv6
==========
ICMPv6 is very important for IPv6. ICMPv6 does not only provide basic features such as echo, reply like icmp, it also provides a framework for the following:
  • Multicast Listener Discovery (MLD)

MLD is a series of three ICMPv6 messages that replace version 2 of the
Internet Group Management Protocol (IGMP) for IPv4 to manage subnet
multicast membership. For more information, see
Multicast Listener Discovery (MLD)
. Just like ipv4 IGMP.
  • Neighbor Discovery (ND)

Neighbor Discovery is a series of five ICMPv6 messages that manage
node-to-node communication on a link. Neighbor Discovery replaces
Address Resolution Protocol (ARP), ICMPv4 Router Discovery, and the
ICMPv4 Redirect message and provides additional functions. For more
information, see
Neighbor Discovery (ND)
.
TypeDescriptionReferences
0  
1Destination unreachable.
RFC 2463
,
RFC 4443
2Packet too big.
RFC 2463
,
RFC 4443
3Time exceeded.
RFC 2463
,
RFC 4443
4Parameter problem.
RFC 2463
,
RFC 4443
5
-
99  
100
101Private experimentation.
RFC 4443
102
-
126  
127reserved for expansion of ICMPv6 error messages.
RFC 4443
128Echo request.
RFC 2463
,
RFC 4443
129Echo reply.
RFC 2463
,
RFC 4443
130Group Membership Query.RFC 2710 MLD
131Group Membership Report.RFC 2710 MLD
132Group Membership Reduction/Done.RFC 2710 MLD
133Router Solicitation.
RFC 2461 ND

134Router Advertisement.
RFC 2461 ND

135Neighbor Solicitation.
RFC 2461 ND

136Neighbor Advertisement.
RFC 2461 ND

137Redirect.
RFC 2461 ND

ICMPv6 header defines a variety of ICMPv6 message contents, thus, different packet will have different fields in ICMPv6 data section.
Stateless Autoconfiguration
=============
Process of stateless autoconfigure
Note:
1. Router can only autoconfigure link-local address
2. host can autoconfigure link-local, global unicast, site-local address.
3. No matter what address is autoconfigured, it needs to be testing in case duplicate.
4. Detecting duplicate address lies on neighbor solicitation message and neighbor advertisement message.
5. Autoconfigured ipv6 address will have an expiration timer.
How to detect duplicate address
1. node sends out a neighbor solicitation message with unspecified address as source, body message contains tentative autoconfigured address
2. if it's already used, responsed neighbor advertisement will contain tentative autoconfigured address
3. another node is detecting duplicate address, so same type of packet is received.
4. neither of the above two packets received, the address is unique.
Router solicitation and Router advertisement
============
These two messages are used in stateless autoconfiguration when a host wants to get an ipv6 address.
Router advertisement is automatically sent periodically when 'ipv6 unicast-routing' command is used. It's just for ethernet and FDDI interfaces, for other interfaces, it must be enabled manually. Dst is FF02::1.
It contains the following data:
1. One or more ipv6 prefix
2. lifetime of these prefix
3. autoconf type (stateless or stateful)
4. default router
5. others
It is also taken as router solicitation's response.
Router solicitation is sent by host when host boots up. Src is unspecified address ::/128. Dst is FF02::2.
               
               
               
               
               
               
               
               
               
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/42903/showart_411896.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP