資 管 lee lesson 3 ipv4/v6 addressing. 資 管 lee lesson objectives ipv6/v4 address space ipv6...
Post on 22-Dec-2015
233 Views
Preview:
TRANSCRIPT
資 管 Lee <Lesson 3-1>
Lesson 3
IPv4/v6 Addressing
資 管 Lee <Lesson 3-2>
Lesson ObjectivesIPv6/v4 address spaceIPv6 address syntaxUnicast IPv6 addressesMulticast IPv6 addressesAnycast IPv6 addressesIPv6 interface identifiersIPv4 addresses and IPv6 equivalents
資 管 Lee <Lesson 3-3>
IPv4 addressing
資 管 Lee <Lesson 3-4>
4
IP v4 addressingIP 網址
◦32 位元長度,分為四組,每組以 10 進位表示 dec3.dec2.dec1.dec0 ( 如 163.13.4.3)
◦分為網路位址 (Network Address) 與主機位址 (Host Address) 【 Network Number, Host Number 】
◦如 IP 位址為 163.13.4.3 則 網路位址 = 163.13.0.0 主機位址 = 0.0.4.3
◦Netmask: 無次網 :255.255.0.0 次網 : 255.255.192.0 ?
Network number host number
32 bits
1111111111111111 0000000000000000
32 bits
Network number host number
IP Netmask
IP Address
資 管 Lee <Lesson 3-5>
IP v4 addressingIPv4 網址分級
00000000
0NetworkNumber Host Number
Class A 1.0.0.0 ~ 126.0.0.0
10
Networ Number Host Number
Class B 128.0.0.0 ~ 191.255.0.0
Networ NumberHost
Number
Class C 192.0.0.0 ~ 223.255.255.0
110
Class D 224.0.0.0 ~ 239.255.255.255
Class E 240.0.0.0 ~ 255.255.255.254
Multicast
Reserved
00000000 00000000 00000000
Default Router 0.0.0.0
01111111 00000000 00000000 00000000
Loopback Address 127.0.0.0
01111111 00000000 00000000 00000001
Local Host 127.0.0.1
1110
11110
資 管 Lee <Lesson 3-6>
保留位址: ◦預定閘門 (Default Router) : 0.0.0.0 ◦回繞位址 (Loopback Address) : 127.0.0.0 ◦回繞主機 (Loopback Host) : 127.0.0.1 ◦廣播位位 (Broadcast Address0
所有主機: 255.255.255.255 某一網路: 164.168.255.255 (164.168.0.0 網路
ID)
資 管 Lee <Lesson 3-7>
Private Networks
Addresses for private network
Class Netids TotalA 10. 1B 172.16 to 172.31 16C 192.68.0 to 192.68.255 256
類別 網路位址
主機位址
最多主機數量
可分配的組織數
A 8位元 24位元 16,777,214 128
B 16位元 16位元 65,534 16,384
C 24位元 8位元 254 2,097,152
資 管 Lee <Lesson 3-8>
網址不分級網址不分級 (CIDR, Classless Inter-Domain
Routing)◦ a four-part dotted-decimal address, followed
by a slash, then a number from 0 to 32: 格式 : A.B.C.D/N. 例如 : 163.13.200.98 /16
CIDR subnet 網域 : 163.13.200.98 /16 次網 :163.13.226.98/19 問分成幾個次網 ?
10.10.1.32/27
資 管 Lee <Lesson 3-9>
IPv4 網址使用狀況32 at 2009/1/28
資 管 Lee <Lesson 3-10>
IPv6 addressing
資 管 Lee <Lesson 3-11>
The IPv6 Address Space 128-bit address space
◦ 2128 possible addresses◦ 340,282,366,920,938,463,463,374,607,431,768,211,456
addresses (3.4 x 1038) Why 128 bits
◦ allow multiple levels of hierarchy and flexibility in designing hierarchical addressing and routing
Typical unicast IPv6 address:◦ 64 bits for subnet ID, 64 bits for interface ID
64 位元之 Subnet ID 64 位元之 interface ID
資 管 Lee <Lesson 3-12>
Allocation 前置 (prefix) 所佔比率 (Fraction)
Reversed 0000 0000 1/256 (0000:…/8)
NSAP Allocation 0000 001 1/128 (0200:…/7)
Aggregatable Global Unicast 001 1/8 (2000:…./3, 3000:…./3)
Link-Local Unicast 1111 1110 10 1/1024 (FE80:…./10)
Site-Local Unicast 1111 1110 11 1/1024 (FEC0:…./10)
Multicast 1111 1111 1/256 (FF…./8)
資 管 Lee <Lesson 3-13>
IPv6 Address SyntaxIPv6 Syntax
1) IPv6 address in binary form:00100001110110100000000011010011000000000000000000101111001110110000001010101010000000001111111111111110001010001001110001011010
2) Divided along 16-bit boundaries:0010000111011010 0000000011010011 0000000000000000 00101111001110110000001010101010 0000000011111111 1111111000101000 1001110001011010
3) Each 16-bit block is converted to hexadecimal and delimited with colons:21DA:00D3:0000:2F3B:02AA:00FF:FE28:9C5A
4) Suppress leading zeros within each 16-bit block:21DA:D3:0:2F3B:2AA:FF:FE28:9C5A
資 管 Lee <Lesson 3-14>
Compressing ZerosSome IPv6 addresses contain long
sequences of zeros◦ A single contiguous sequence of 16-bit blocks set to 0
can be compressed to “::” (double-colon)
Example:◦ FE80:0:0:0:2AA:FF:FE9A:4CA2 FE80::2AA:FF:FE9A:4CA2◦ FF02:0:0:0:0:0:0:2 FF02::2
Cannot use zero compression to include part of a 16-bit block◦ FF02:30:0:0:0:0:0:5 does not become FF02:3::5.
資 管 Lee <Lesson 3-15>
IPv6 Prefixes (CIDR)IPv6 subnets or routes always uses
address/prefix-length notation◦CIDR notation
Examples:◦21DA:D3::/48 for a route◦21DA:D3:0:2F3B::/64 for a subnet
No more dotted decimal subnet masks as in IPv4
資 管 Lee <Lesson 3-16>
Types of IPv6 AddressesUnicast
◦Address of a single interface◦One-to-one delivery to single interface
Multicast◦Address of a set of interfaces◦One-to-many delivery to all interfaces in the
setAnycast
◦Address of a set of interfaces◦One-to-one-of-many delivery to a single
interface in the set that is closestNo more broadcast addresses
資 管 Lee <Lesson 3-17>
Unicast IPv6 Addresses 類別
Aggregatable global unicast addresses
Link-local addressesSite-local addressesSpecial addressesCompatibility addressesNSAP addresses
資 管 Lee <Lesson 3-18>
Aggregatable Global Unicast Addresses
Top-Level Aggregation ID (TLA ID)Next-Level Aggregation ID (NLA ID)Site-Level Aggregation ID (SLA ID)Interface ID
TLA ID Interface ID
13 bits 64 bits
SLA ID
24 bits
001 NLA ID
16 bits
Res
8 bits
資 管 Lee <Lesson 3-19>
Topologies Within Global AddressesPublic TopologySite TopologyInterface ID
TLA ID Interface ID
64 bits
SLA ID001 NLA ID
16 bits
Res
48 bits
Public Topology Site Topology Interface Identifier
資 管 Lee <Lesson 3-20>
Local-Use Unicast Addresses
Link-local addresses ◦Used between on-link neighbors and for
Neighbor DiscoverySite-local addresses
◦Used between nodes in the same site
資 管 Lee <Lesson 3-21>
Link-Local AddressesFormat Prefix 1111 1110 10
◦FE80::/64 prefixUsed for local link only
◦Single subnet, no router◦Address autoconfiguration◦Neighbor Discovery
1111 1110 10 Interface ID
10 bits 64 bits
000 . . . 000
54 bits
資 管 Lee <Lesson 3-22>
Site-Local AddressesFormat Prefix 1111 1110 11
◦FEC0::/48 prefix for siteUsed for local site only
◦Replacement for IPv4 private addresses◦ Intranets not connected to the Internet◦Routers do not forward site-local traffic
outside the site
1111 1110 11 Interface ID
10 bits 64 bits
000 . . . 000
38 bits
Subnet ID
16 bits
資 管 Lee <Lesson 3-23>
Special IPv6 Addresses
Unspecified address◦0:0:0:0:0:0:0:0 or ::◦ Indicate the absence of an address. Typical
used as a source addr. When a unique addr. has not yet been determined.
Loopback address◦0:0:0:0:0:0:0:1 or ::1◦ Identify a loopback interface, enabling a node
to send packets to itself.
資 管 Lee <Lesson 3-24>
Compatibility AddressesIPv4-compatible address
◦0:0:0:0:0:0:w.x.y.z or ::w.x.y.zIPv4-mapped address
◦0:0:0:0:0:FFFF:w.x.y.z or ::FFFF:w.x.y.z6over4 address
◦[64-bit prefix]:0:0 :WWXX:YYZZ (WWXX:YYZZ is the hexadecimal value of w.x.y.z )
6to4 address◦Prefix of 2002:WWXX:YYZZ::/48
ISATAP address◦[64-bit prefix]: 0:5EFE:w.x.y.z
資 管 Lee <Lesson 3-25>
NSAP Addresses
0000001 NSAP-mapped address
7 bits 121 bits
Provide a way of mapping Open System Interconnect (OSI) NSAP (Network Service Access Point)addresses to IPv6 address. [RFC 1888]
NSAP addresses are used in the following OSI-based network technologies:
ATM switched virtual circuit networks X.25 (see ITU-T X.121 for addressing in public data networks) Frame relay IS-IS SDH & SONET networks.
資 管 Lee <Lesson 3-26>
Multicast IPv6 AddressesFlags (4 bits, only last bit is defined, 0 mean permanently, 1,
mean transient)
Scope (4 bits, value: 0, reserved, 1, Node-local scope, 2 Link-local scope, 5 site-local scope, 8 organization-local scope, E Global scope, F Reversed)
Defined multicast addresses◦All-Nodes addresses
FF01::1 (Node Local), FF02::1 (Link Local)
◦All-Routers addresses FF01::2 (Node Local), FF02::2 (Link Local), FF05::2 (Site
Local)
1111 1111 Group ID
8 bits 112 bits
Flags
4 bits
Scope
4 bits
資 管 Lee <Lesson 3-27>
Recommended Multicast IPv6 Addresses
Only 32 bits are used to indicate the Group ID◦Single IPv6 multicast address maps to a
single Ethernet multicast MAC address
1111 1111 Group ID
8 bits 32 bits
Flags
4 bits
Scope
4 bits 80 bits
000 … 000
資 管 Lee <Lesson 3-28>
Solicited-Node Address
Example:◦ Node A link-local is FE80::2AA:FF:FE28:9C5A, listening to
the corresponding solicited-node address FF02::1:FF28:9C5A
Acts as a pseudo-unicast address for very efficient address resolution
Interface ID
64 bits
Unicast prefix
64 bits
FF02:
24 bits
:1:FF0:0:0:0
資 管 Lee <Lesson 3-29>
Anycast IPv6 AddressesNot associated with any prefixSummary and host routes are used to
locate nearest anycast group memberSubnet router anycast address:
Subnet Prefix 000 . . . 000
n bits 128 - n bits
資 管 Lee <Lesson 3-30>
IPv6 Addresses for a HostUnicast addresses:
◦A link-local address for each interface◦Unicast addresses for each interface (site-
local or global addresses)◦A loopback address (::1)
Listening to the Multicast addresses:◦The node-local scope all-nodes multicast
address (FF01::1)◦The link-local scope all-nodes multicast
address (FF02::1)◦The solicited-node address for each unicast
address◦The multicast addresses of joined groups
資 管 Lee <Lesson 3-31>
IPv6 Addresses for a RouterUnicast addresses:
◦ A link-local address for each interface◦ Unicast addresses for each interface◦ Loopback address (::1)
Anycast addresses◦ Subnet-router anycast address◦ Additional anycast addresses (optional)
Listening to the Multicast addresses:◦ The node-local scope all-nodes multicast address (FF01::1)◦ The node-local scope all-routers multicast address (FF01::2)◦ The link-local scope all-nodes multicast address (FF02::1)◦ The link-local scope all-routers multicast address (FF02::2)◦ The site-local scope all-routers multicast address (FF05::2)◦ The solicited-node address for each unicast address◦ The multicast addresses of joined groups
資 管 Lee <Lesson 3-32>
Subnetting the IPv6 Address Space
Subdividing by using high-order bits that do not already have fixed values to create subnetted network prefixes
Two-step process:1. Determine the number of bits to be
used for the subnetting2. Enumerate the new subnetted network
prefixes
資 管 Lee <Lesson 3-33>
Subnetting for NLA IDs
Hexadecimal methodDecimal method
[16-bit prefix]:00 ::
f
s
r
資 管 Lee <Lesson 3-34>
Subnetting for SLA IDs
Hexadecimal methodDecimal method
[48-bit prefix]: ::
f
s
r
資 管 Lee <Lesson 3-35>
IPv6 Interface IdentifiersThe last 64 bits of unicast IPv6
addressesInterface identifier based on:
◦Extended Unique Identifier (EUI)-64 address Either assigned to a network adapter card or derived from IEEE 802
addresses
◦Temporarily assigned, randomly generated value that changes over time
◦A value assigned by a stateful address configuration protocol
◦A value assigned during a Point-to-Point Protocol connection establishment
◦A manually configured value
資 管 Lee <Lesson 3-36>
MAC 48, EUI-48, EUI-64Company IDExtension IDU/L bit (u)
◦Universally (=0)/Locally (=1) AdministeredU/G bit (g)
◦Unicast (=0)/Group (=1) Address
ccccccug cccccccc cccccccc
24 bits 24 bits
xxxxxxxx xxxxxxxx xxxxxxxx
IEEE-administered company ID Manufacturer-selected extension ID
資 管 Lee <Lesson 3-37>
IEEE EUI-64 AddressesExtended Unique IdentifierCompany IDExtension ID
ccccccug cccccccc cccccccc
24 bits 40 bits
xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx
IEEE-administered company ID Manufacturer-selected extension ID
資 管 Lee <Lesson 3-38>
Conversion of an IEEE 802 Address to an EUI-64 Address
ccccccug cccccccc cccccccc
24 bits 24 bits
xxxxxxxx xxxxxxxx xxxxxxxx
ccccccug cccccccc cccccccc xxxxxxxx xxxxxxxx xxxxxxxx11111111 11111110
0xFF 0xFE
IEEE-administered company ID Manufacturer-selected extension ID
EUI-64 Address
IEEE 802 Address
資 管 Lee <Lesson 3-39>
Conversion of an EUI-64 Address to an IPv6 Interface ID
ccccccug cccccccc ccccccccxxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx
EUI-64 Address
ccccccUg cccccccc ccccccccxxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx
IPv6 Interface Identifier
Complement the universally/locally administered (U/L) bit
資 管 Lee <Lesson 3-40>
Conversion of an IEEE 802 Address to an IPv6 Interface ID
cccccc00 cccccccc cccccccc xxxxxxxx xxxxxxxx xxxxxxxx1111111111111110
0xFF 0xFE
EUI-64 Address
cccccc00 cccccccc cccccccc
24 bits 24 bits
xxxxxxxx xxxxxxxx xxxxxxxx
IEEE-administered company ID Manufacturer-selected extension ID
IEEE 802 Address
cccccc10 cccccccc cccccccc
64 bits
11111111 11111110 xxxxxxxx xxxxxxxx xxxxxxxx
IPv6 Interface Identifier
資 管 Lee <Lesson 3-41>
IEEE 802 Address Conversion Example
Host A has the MAC address of 00-AA-00-3F-2A-1C1. Convert to EUI-64 format
◦ 00-AA-00-FF-FE-3F-2A-1C
2. Complement the U/L bit◦ The first byte in binary form is 00000000. When the seventh bit is
complemented, it becomes 00000010 (0x02). ◦ Result is 02-AA-00-FF-FE-3F-2A-1C
3. Convert to colon hexadecimal notation◦ 2AA:FF:FE3F:2A1C
Link-local address for node with the MAC address of 00-AA-00-3F-2A-1C is FE80::2AA:FF:FE3F:2A1C.
資 管 Lee <Lesson 3-42>
Temporary Address Interface Identifiers
Random IPv6 interface identifier◦Prevent identification of traffic regardless of
the prefix◦ Initial value based on random number◦Future values based on MD5 hash of history
value and EUI-64-based interface identifierResult is a temporary address
◦Generated from public address prefixes using stateless address autoconfiguration
◦Changes over time
資 管 Lee <Lesson 3-43>
Mapping IPv6 Multicast Addresses to Ethernet AddressesIPv6
Multicast Address8 16 24 32
FF...:
33-33-
Ethernet Multicast Address
For example: an host with MAC address of 00-AA-00-3F-2A-1C (i.e., link-local IPv6 address is FE80::2AA:FF:FE3F:2A1C) adds the followingMulticast MAC addresses to the table of interesting destination MAC addressesOn the Ethernet adaptor:
• The address of 33-33-00-00-00-01, which corresponding to FF02::1• the address of 33-33-FF-3F-2A-1C, which corresponds to the solicited-node
address of FF02::1:FF3F:2A1C. (Remember that the solicited address is the Prefix FF02::1:FF00:0/104 and the last 24 bits of the unicast IPv6 address.
資 管 Lee <Lesson 3-44>
IPv4 Addresses and IPv6 Equivalents
IPv4 Address IPv6 AddressInternet address classes N/AMulticast addresses (224.0.0.0/4) IPv6 multicast addresses (FF00::/8)Broadcast addresses N/AUnspecified address is 0.0.0.0 Unspecified address is ::Loopback address is 127.0.0.1 Loopback address is ::1Public IP addresses Aggregatable global unicast addressesPrivate IP addresses Site-local addresses (FEC0::/48)APIPA addresses [RFC 3927] Link-local addresses (FE80::/64)Dotted decimal notation Colon hexadecimal formatSubnet mask or prefix length Prefix length notation only
資 管 Lee <Lesson 3-45>
Review
IPv6 address spaceIPv6 address syntaxUnicast IPv6 addressesMulticast IPv6 addressesAnycast IPv6 addressesIPv6 interface identifiersIPv4 addresses and IPv6 equivalents
top related