IPv6 技術講習一般課程 -- IPv6協議運作原理與應用 All rights reserved. No part of this publication and file may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying, recording or otherwise, without prior written permission of Professor Nen-Fu Huang (E-mail: [email protected]). 黃能富特聘教授 國立清華大學資訊工程系 E-mail: [email protected]
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
IPv6 技術講習一般課程 --
IPv6協議運作原理與應用
All rights reserved. No part of this publication and file may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying, recording or otherwise, without prior written permission of Professor Nen-Fu Huang (E-mail: [email protected]).
Link-local addresses for use during auto-configuration and when no routers are present:
Site-local addresses for independence from changes of TLA / NLA*:
Link-Local and Site-Local address
1111111010 0 interface ID
1111111011 0 interface ID SLA*
IPv6 協議與應用 - 19
Interface IDs
Lowest-order 64-bit field of unicast address may be assigned in several different ways:
auto-configured from a 64-bit EUI-64, or expanded from a 48-bit MAC address (e.g., Ethernet address)
auto-generated pseudo-random number (to address privacy concerns)
assigned via DHCP
manually configured
possibly other methods in the future
IPv6 協議與應用 - 20
IPv6 Address Space
Allocation Space Prefix (binary) Fraction of
Address Space
Reserved 0000 0000 1/256
Unassigned 0000 0001 1/256
Reserved for NSAP Allocation 0000 001 1/128
Reserved for IPX Allocation 0000 010 1/128
Unassigned 0000 011 1/128
Unassigned 0000 1 1/32
Unassigned 0001 1/16
Unassigned 001 1/8
Provider-Based Unicast Address 010 1/8
Unassigned 011 1/8
Reserved for Geographic-Based
Unicast Addresses
100 1/8
Unassigned 101 1/8
Unassigned 110 1/8
Unassigned 1110 1/16
Unassigned 1111 0 1/32
Unassigned 1111 10 1/64
Unassigned 1111 110 1/128
Unassigned 1111 1110 0 1/512
Link Local Use Addresses 1111 1110 10 1/1024
Site Local Use Addresses 1111 1110 11 1/1024
Multicast Addresses 1111 1111 1/256
IPv6 協議與應用 - 21
The Evolution of ICMP
The ICMP for IPv4 was made more complete by incorporating the multicast control functions of the IPv4 Group Membership Protocol (IGMP).
ICMP Type Meaning
1 Destination Unreachable
2 Packet Too Big
3 Time Exceeded
4 Parameter Problem
128 Echo Request
129 Echo Reply
130 Group Membership Query
131 Group Membership Report
132 Group Membership Termination
133 Router Solicitation
134 Router Advertisement
135 Neighbor Solicitation
136 Neighbor Advertisement
137 Redirect
IPv6 協議與應用 - 22 22
IPv6 Routing
As in IPv4, IPv6 supports IGP and EGP routing protocols:
IGP (Interior Gateway Protocol) for within an autonomous system (AS) are
RIPng (RFC 2080)
OSPFv3 (RFC 2740)
Integrated IS-ISv6 (draft-ietf-isis-ipv6-02.txt)
EGP (Edge Gateway Protocol) for peering between autonomous systems (ASs)
MP-BGP4 (RFC 2858 and RFC 2545)
IPv6 協議與應用 - 23
IPv6 Routing
BGP4+
Added IPv6 address-family
Added IPv6 transport
Runs within the same process - only one AS supported
All generic BGP functionality works as for IPv4
Added functionality to route-maps and prefix-lists
IPv6 協議與應用 - 24
Plug-and-Play -- Auto-configuration
Auto-configuration means that a computer will automatically discover and register the parameters that it needs to use in order to connect to the Internet.
One should be able to change IPv6 addresses dynamically as one changes ISP providers.
Addresses would be assigned to interfaces for a limited lifetime.
Two modes for address configuration
Stateless mode
Stateful mode (using DHCPv6)
IPv6 協議與應用 - 25
Link State Addresses
When an interface is initialized, the host can build up a link local address for this interface by concatenating the well-known link local prefix and a unique token (48-bit Ethernet address).
A typical link local address:
FE80:0:0:0:0:XXXX:XXXX:XXXX
Link local address can only be used on the local link.
IPv6 協議與應用 - 26
Stateless Autoconfiguration
IPv6 nodes join the all nodes multicast group by programming their interfaces to receive all the packets for the address = FF02::1.
Send a solicitation message to the routers on the link, using the all routers address, FF02::2.
Routers reply with a router advertisement message.
Does not require any servers
IPv6 協議與應用 - 27
Plug-and-Play -- Address Resolution
The neighbor discovery procedure offers the functions of ARP (IP MAC) and router discovery.
Defined as part of IPv6 ICMP.
Host maintains four separate caches:
The destination’s cache.
The neighbor’s cache.
The prefix list.
The router list.
IPv6 協議與應用 - 28
Destination’s Cache
The destination’s cache has an entry for each destination address toward which the host recently sent packets.
It associates the IPv6 address of the destination with that of the neighbor toward which the packets were sent.
The neighbor’s cache has an entry for the immediately adjacent neighbor to which packets were recently relayed.
It associates the IPv6 address of that neighbor with the corresponding MAC address (48 bits).
Neighbor Neighbor IPv6 Address MAC address
IPv6 協議與應用 - 30
Prefix List and Router List
The prefix list includes the prefixes that have been recently learned from router advertisements.
The router list includes the IPv6 addresses of all routers from which advertisements have recently been received.
IPv6 協議與應用 - 31
Basic Algorithm to Transmit a Packet
To transmit a packet, the host must first find out the next hop for the destination. The next hop should be a neighbor directly connected to the same link as the host.
In most cases, the neighbor address will be found in the destination’s cache.
If not, the host will check whether one of the cached prefixes matches the destination address.
If yes, the destination is local, the next hop is the destination itself.
雙方都在同一個子網路內, 可直接傳送給對方
IPv6 協議與應用 - 32
Basic Algorithm
Otherwise, the destination is probably remote.
A router should be selected from the router list as the next hop.
雙方不在同一個子網路, 需透過 Router 傳送 給對方
The corresponding entry for the next hop is added to the destination’s cache (更新), and the neighbor’s cache is looked up (查詢) to find the MAC address of that neighbor.
IPv6 協議與應用 - 33
Neighbor Solicitation and Neighbor Advertisement messages (IPv6 MAC)
IPv6 source address = link local address of the interface.
Hop count = 1.
IPv6 destination address = solicited node multicast address, which is formed by cascating a fixed 96-bit prefix, FF02:0:0:0:0:1, and the last 32 bits of the node’s IPv6 address.