Anda di halaman 1dari 57

REDES DE COMPUTADORES

Clase 4. IPv6 Addressing

Ing. Msc. Alberto Arellano


aarellano@espoch.edu.ec
CCNA CCNP - CCSP

A.

Why are they making me learn IPv6?

The Internet of Things, The Internet of Everything

The Internet is more than just connecting people.


At the very least we need IPv6 for the Internet to continue.
3

When do I have to go to
IPv6?

IPv4 IPv6
IPv4 and IPv6 will coexist for the foreseeable future.
Dual-stack Device running both IPv4 and IPv6.
4

Various transition strategies


Tunneling IPv6 packets
encapsulated inside IPv4 packets.

NAT64 Translating between


IPv4 and IPv6.
Native IPv6 All IPv6 devices

IPv4 and IPv6

IPv6 is more than just larger

address space.
It was a chance to make some

improvements on the IP
protocol.
6

IPv6 at a Glance
Next Header = Protocol field in IPv4.

Indicates the data payload type


(TCP, UDP, ICMPv6)
Hop Limit = TTL (Time to Live) in

IPv4.
Number of router hops before packet
is discarded.
Routers do not fragment IPv6 packets unless it is the source of the packet.
Use of a Link-Local Address.
ICMPv6 is more robust than ICMPv4.
SLAAC (Stateless Address Autoconfiguration) for dynamic addressing.

Understanding the format of IPv6 Address

IPv6 Address Notation


One Hex digit = 4 bits
2001:0DB8:AAAA:1111:0000:0000:0000:0100/64
2001 : 0DB8 : AAAA : 1111 : 0000 : 0000 : 0000 : 0100
16 bits
1

16 bits
2

16 bits
3

16 bits
4

16 bits
5

16 bits
6

16 bits
7

16 bits
8

IPv6 addresses are 128-bit addresses represented in:


Eight 16-bit segments or hextets (not a formal term)
Hexadecimal (non-case sensitive) between 0000 and FFFF
Separated by colons
Reading and subnetting IPv6 is easier than IPv4!

2001:0DB8:AAAA:1111:0000:0000:0000:0100/64
2001 : 0DB8 : AAAA : 1111 : 0000 : 0000 : 0000 : 0100
16 bits

16 bits

16 bits

16 bits

16 bits

16 bits

16 bits

16 bits

How many addresses does 128 bits give us?


340 undecillion addesses or
340 trillion trillion trillion addresses or
50 billion billion billion addresses for every person on earth or.
A string of soccer balls would wrap around our universe 200 billion times!
in other words
You wont need to learn IPv7 for the next version of CCNA!

10

Rule 1: Leading 0s
Two rules for reducing the size of written IPv6 addresses.
The first rule is: Leading zeroes in any 16-bit segment do not have to be written.
2001 : 0DB8 : 0001 : 1000 : 0000 : 0000 : 0ef0 : bc00
2001 :

DB8 :

1 : 1000 :

0 :

0 :

ef0 : bc00

2001 : 0DB8 : 010d : 000a : 00dd : c000 : e000 : 0001


2001 :

DB8 :

10d :

a :

dd : c000 : e000 :

2001 : 0DB8 : 0000 : 0000 : 0000 : 0000 : 0000 : 0500


2001 :

DB8 :

0 :

0 :

0 :

0 :

0 :

500
11

Rule 2: Double colon :: equals 00000000


The second rule can reduce this address even further:
Any single, contiguous string of one or more 16-bit segments
consisting of all zeroes can be represented with a double colon.
FE80 : 0000 : 0000 : 0000 : 0000 : 0000 : 0000 : 0001
FE80 :

:
Second Rule

First Rule

FE80::1
12

Rule 2: Double colon :: equals 00000000


Only a single contiguous string of all-zero segments can be
represented with a double colon.
Both of these are correct
FE80 : 0000 : 0000 : 0000 : 0014 : 0000 : 0000 : 0095

FE80 ::

14 :

0 :

0 :

95

OR
FE80 :

0 :

0 :

0 :

14 ::

95
13

Rule 2: Double colon :: equals 00000000


Using the double colon more than once in an IPv6 address can create
ambiguity because of the ambiguity in the number of 0s.
FE80::14::95
FE80:0000:0000:0000:0014:0000:0000:0095
FE80:0000:0000::0014:0000:00000000:0095
FE80:0000:0014:0000:0000:0000:0000:0095

14

Network Prefixes
IPv4, the prefixthe network portion of the addresscan be identified
by a dotted decimal netmask or bitcount.
255.255.255.0

or /24

IPv6 prefixes are always identified by bitcount (prefix length).


Prefix length notation:
3ffe:1944:100:a::/64

16

32

48 64 bits
15

IPv6 Addresses

16

IPv6 Addressing

Assigned
FF00::/8

Global
Unicast

Link-Local

2000::/3
3FFF::/3

FE80::/10
FEBF::/10

Anycast

Multicast

Unicast

Solicited Node
FF02::1:FF00:0000/104

Loopback

Unspecified

Unique
Local

::1/12
8

::/128

FC00::/7
FDFF::/7

Embedded
IPv4
::/80
17

Global Unicast IPv6 Addresses

18

Global Unicast Address (GUA)


Global Routing Prefix Subnet ID
001

Range:
to

2000::/3
3FFF::/3

Global unicast addresses


are similar to IPv4
addresses
Routable
Unique

Interface ID

0010 0000 0000 0000 ::


0011 1111 1111 1111 ::
IANAs allocation of IPv6 address space in
1/8th sections

19

Global Unicast Address (GUA)


Global Routing Prefix Subnet ID
001

Range:
to

2000::/3
3FFF::/3

Interface ID

0010 0000 0000 0000 ::


0011 1111 1111 1111 ::

Global unicast addresses are equivalent to IPv4 public


addresses
Except under very specific circumstances, all end users will
have a global unicast address
Terminology:
Prefix equivalent to network address
Prefix length equivalent to subnet mask in IPv4
Interface ID equivalent to host portion
20

Typical Global Unicast Address and Why We Love IPv6!


IPv4 Unicast Address
Network portion

/?
Subnet portion

Host portion

32 bits
IPv6 Global Unicast Address
/64
/48
16-bit Fixed
Global Routing Prefix
Subnet ID

Interface ID

128 bits
64-bit Interface ID = 18 quintillion (18,446,744,073,709,551,616) devices/subnet
16-bit Subnet ID = 65,536 subnets
21

/64 Global Unicast Addresses and the 3-1-4 rule


/48
16 bits

16 bits

16 bits

/64
16 bits

Global Routing Prefix Subnet ID

16 bits

16 bits

16 bits

16 bits

Interface ID

2001 : 0DB8 : AAAA : 1111 : 0000 : 0000 : 0000 : 0100


3 + 1 = 4 (/64) :
4
2001:0DB8:AAAA:1111:0000:0000:0000:0100/64
2001:0DB8:AAAA:1111::100/64
22

Subnetting IPv6 and Why We REALLY Love IPv6

Just increment by 1 in Hexadecimal:


2001:0DB8:AAAA:0000::/64
2001:0DB8:AAAA:0001::/64
2001:0DB8:AAAA:0002::/64

3-1-4 Rule

2001:0DB8:AAAA:000A::/64
Valid abbreviation is to remove the 3 leading 0s from the first shown quartet
2001:0DB8:AAAA:1::/64
23

Subnetting into the Interface ID


/112

/48
48 bits

64 bits

Global Routing Prefix

16bits

Subnet ID
Prefix

Global Routing Prefix

2001 : 0DB8 : AAAA : 0000


2001 : 0DB8 : AAAA : 0000
2001 : 0DB8 : AAAA : 0000
thru
2001 : 0DB8 : AAAA : FFFF
2001 : 0DB8 : AAAA : FFFF

Interface ID
Subnet-ID

Interface ID

: 0000 : 0000 : 0000 : 0000


: 0000 : 0000 : 0001 : 0000
: 0000 : 0000 : 0002 : 0000
: FFFF : FFFF : FFFE : 0000
: FFFF : FFFF : FFFF : 0000
24

Subnetting on a nibble boundary


/68

/48
48 bits

Global Routing Prefix

20 bits

60 bits

Subnet ID

Interface ID

/68 Prefix
Subnetting on a nibble (4 bit) boundary makes it easier to list the subnets:
/68
/64, /68, /72, etc.
2001:0DB8:AAAA:0000:0000::/68
2001:0DB8:AAAA:0000:1000::/68
2001:0DB8:AAAA:0000:2000::/68

through

2001:0DB8:AAAA:FFFF:F000::/68
25

Configuring a Global Unicast Address


Global Unicast

Manual

IPv6
Unnumbered

IPv6 Address

Static

Dynamic

Stateless
Autoconfiguration

DHCPv6

EUI-64

CCNA or CCNP Routing

26

Topology

27

R1(config)#interface gigabitethernet 0/0


R1(config-if)#ipv6 address 2001:db8:acad:1::1/64
R1(config-if)#no shutdown
R1(config-if)#exit
No space

Exactly the same as an IPv4 address only different.


No space between IPv6 address and Prefix-length.
IOS commands for IPv6 are very similar to their IPv4 counterpart.
All 0s and all 1s are valid IPv6 host IPv6 addresses.
28

R1(config)#interface gigabitethernet 0/1


R1(config-if)#ipv6 address 2001:db8:acad:2::1/64
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface serial 0/0/0
R1(config-if)#ipv6 address 2001:db8:acad:3::1/64
R1(config-if)#clock rate 56000
R1(config-if)#no shutdown

29

show running-config command on router R1


R1# show running-config
<output omitted for brevity>
interface GigabitEthernet0/0
no ip address
duplex auto
speed auto
ipv6 address 2001:DB8:ACAD:1::1/64
!

30

show ipv6 interface brief command on router R1


R1# show ipv6 interface brief
GigabitEthernet0/0
[up/up]
FE80::FE99:47FF:FE75:C3E0
2001:DB8:ACAD:1::1

Link-local unicast address


Global unicast address

Link-local address automatically created when (before) the global


unicast address is.
We will discuss link-local addresses next.
31

PC1: Static Global Unicast Address

2001:db8:acad:1::10
64
2001:db8:acad:1::1
32

PC1: Static Global Unicast Address


PC1> ipconfig
Windows IP Configuration
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix

. :

IPv6 Address. . . . . . . . . . . : 2001:db8:acad:1::10


Link-local IPv6 Address . . . . . : fe80::50a5:8a35:a5bb:66e1%11
Default Gateway . . . . . . . . . : 2001:db8:acad:1::1

33

Pinging a Global Unicast IPv6 Addresses


Ping uses ICMPv6 Echo Request and Echo Reply messages similar to ICMPv4.
PC1> ping 2001:db8:acad:1::1
Pinging 2001:db8:acad:1::1 from 2001:db8:acad:1::100 with 32 bytes of
data:
Reply
Reply
Reply
Reply

from
from
from
from

2001:db8:acad:1::1:
2001:db8:acad:1::1:
2001:db8:acad:1::1:
2001:db8:acad:1::1:

time=1ms
time=1ms
time=1ms
time=1ms

Ping statistics for 2001:db8:acad:1::1:


Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 1ms, Maximum = 1ms, Average = 1ms
PC1>
34

Configuring Dynamic IPv6 Addresses


Global Unicast

Dynamic

Manual

IPv6
Unnumbered

IPv6 Address

Static

Stateless
Autoconfiguration

DHCPv6

EUI-64

35

IPv4 Dynamic Addresses


DHCP Server

36

With IPv6 it begins with the Router Advertisement

The Router Advertisement (RA) tells hosts how it will receive IPv6 Address

Information.
Sent periodically by an IPv6 router or
When the router receives a Router Solicitation message from a host.

37

Router Advertisement

R1(config)# ipv6 unicast-routing


DHCPv6 Server
Router Advertisement/Solicitation Messages
Part of ICMPv6 (Internet Control Message Protocol for IPv6)
Router Advertisements are sent by an IPv6 router ipv6 unicast-routing

command
Forwards IPv6 Packets
Can be enabled for IPv6 static and dynamic routing
Sends ICMPv6 Router Advertisements
Routers can be configured with IPv6 addresses without being an IPv6 router
38

SLAAC (Stateless Address Autoconfiguration)

DHCPv6

R1(config)# ipv6 unicast-routing

DHCPv6
Server

Option 1 (Default on Cisco routers)


Im everything you need (Prefix, Prefix-length, Default Gateway)
Option 2

RA

Here is my information but you need to get other information such


Option 1 and 2: Stateless Address
as DNS addresses from a DHCPv6 server.
Autconfiguration DHCPv6 Server does
not maintain state of addresses

Option 3

Option 3: Stateful Address Configuration


Address received from DHCPv6 Server

I cant help you. Ask a DHCPv6 server for all your information.
39

Router Advertisement Option 1


2001:DB8:ACAD:1::/64

MAC: 00-03-6B-8C-E0-80

1
Option 1 RA Message

To: FF02::1 (All IPv6 devices


multicast)

Prefix: 2001:DB8:ACAD:1::
RA

Prefix-length: /64

From: FE80::1 (Link-local address)

Default Gateway: FE80::1

Prefix: 2001:DB8:ACAD:1::

Global Unicast Address:

Prefix-length: /64

2001:DB8:ACAD:1: + Interface ID
3
DHCPv6 Server

EUI-64 Process or
Random 64-bit value
40

Dynamic Interface ID
Router Advertisement
2001:DB8:ACAD:1::/64
/48
/64
Global Routing Prefix Subnet ID

DHCPv6 Server

64 bits
Interface ID
SLAAC

EUI-64 Process

Randomly Generated Number

Windows operating systems, Windows XP and Server 2003 use EUI-64.


Windows Vista and newer; hosts create a random 64-bit Interface ID.
Linux: Mostly use random 64-bit number
Mac OSX: use EUI-64 (on my Macs)
41

EUI-64 (Extended Unique Identifier 64)


2001:DB8:ACAD:1::/64

MAC: 00-03-6B-E9-D4-80

1
Option 1 RA Message
To:

FF02::1 (All-hosts multicast)

From: FE80::1 (Link-local address)

Prefix: 2001:DB8:ACAD:1::
RA

Prefix: 2001:DB8:ACAD:1::
Prefix-length: /64

Prefix-length: /64
Default Gateway: FE80::1
Global Unicast Address:
2001:DB8:ACAD:1: + Interface ID

DHCPv6 Server

EUI-64 Process or
Random 64-bit value
42

EUI-64

OUI
24 bits
Hexadecimal

00

Device Identifier
24 bits

03

6B

E9

D4

80

1110
1001

1101 0100

1000 0000

Step 1: Split the MAC address


Binary 0000 0000

0000 0011

0110 1011

F F

Step 2: Insert FFFE


Binary 0000 0000 0000 0011

F E

0110 1011

1111 1111

1111 1110

1110
1001

1101 0100

1000 0000

0110 1011

1111 1111

1111 1110

1110
1001

1101 0100

1000 0000

FE

E9

D4

80

Step 3: Flip the U/L bit


Binary 0000 0010

0000 0011

Modified EUI-64 Interface ID in Hexadecimal Notation


Binary

02

03

6B

FF

43

PC1: Global
Unicast Address
Router Advertisement

EUI-64

PC1> ipconfig
Windows IP Configuration
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix

. :

IPv6 Address. . . . . . . . . . . : 2001:db8:acad:1:02-03-6b-ff-fe-e9-d4-80


Link-local IPv6 Address . . . . . : fe80::02-03-6b-ff-fe-e9-d4-80
Default Gateway . . . . . . . . . : fe80::1

A 64-bit Interface ID and the EUI-64 process accommodate the IEEE

specification for a 64-bit MAC address.


44

Link-Local Unicast IPv6 Addresses

45

IPv6 Addressing

Assigned
FF00::/8

Global
Unicast

Link-Local

2000::/3
3FFF::/3

FE80::/10
FEBF::/10

Anycast

Multicast

Unicast

Solicited Node
FF02::1:FF00:0000/104

Loopback

Unspecified

Unique
Local

::1/12
8

::/128

FC00::/7
FDFF::/7

Embedded
IPv4
::/80
46

Link-local Unicast
10 bits

Remaining 54 bits

/64

1111 1110 10xx xxxx

FE80::/10
Range:
to

FE80::/10
FEBF::/10

64
bits

Interface ID
EUI-64, Random or Manual Configuration
1111 1110 1000 0000 ::
1111 1110 1011 1111 ::

47

Link-local unicast
Link-Local Communications

Used to communicate with other devices on the link.


Are NOT routable off the link (network).
Only have to be unique on the link.
Are not included in the IPv6 routing table.
An IPv6 device must have at least a link-local address.
Used by:
Hosts to communicate to the IPv6 network before it has a global unicast
address.
Routers link-local address is used by hosts as the default gateway address.
Adjacent routers to exchange routing updates
48

IOS uses EUI-64 to


Create Link-Local
Addresses

G0/0
G0/1

S0/0/0
Wait!
Two
R1 Link-Locals
are the same!

R1#show interface gigabitethernet 0/0


GigabitEthernet0/0 is up, line protocol is up
Hardware is CN Gigabit Ethernet, address is fc99.4775.c3e0 (bia
fc99.4775.c3e0)
<Output Omitted>
R1#show ipv6 interface brief
GigabitEthernet0/0
[up/up]
FE80::FE99:47FF:FE75:C3E0
2001:DB8:ACAD:1::1
GigabitEthernet0/1
[up/up]
FE80::FE99:47FF:FE75:C3E1
2001:DB8:ACAD:2::1
Serial0/0/0
[up/up]
FE80::FE99:47FF:FE75:C3E0
2001:DB8:ACAD:3::1
R1#

EUI-64
FF:FE = EUI-64 (most likely)
Serial interfaces will use a MAC
address of an Ethernet interface.
49

PC1: Link-Local Unicast Address

PC1> ipconfig
Windows IP Configuration
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix

.:

IPv6 Address. . . . . . . . . : 2001:db8:acad:1:3496:1c51:3f57:fe89


Link-local IPv6 Address . . . : fe80::3496:1c51:3f57:fe89
Default Gateway . . . . . . . : fe80::1

Many operating systems will use a random 64-bit Interface IDs for GUA and Link-

Local IPv6 Addresses.


50

Configuring Static
Link-Local Addresses
Static addresses are more easily remembered
and recognizable.
R1(config)#interface gigabitethernet 0/0
R1(config-if)#ipv6 address fe80::1 ?
link-local Use link-local address

G0/0
FE80::1
G0/1 R1
FE80::1

R1(config-if)#ipv6 address fe80::1 link-local


R1(config-if)#exit
R1(config)#interface gigabitethernet 0/1
R1(config-if)#ipv6 address fe80::1 link-local
R1(config-if)#exit
R1(config)#interface serial 0/0/0
R1(config-if)#ipv6 address fe80::1 link-local
R1(config-if)#

S0/0/0
FE80::1

Link-Local
Addresses only
have to be unique
on the link!

51

ipv6 enable command


Router(config)# interface gigabitethernet 0/1
Router(config-if)# ipv6 enable
Router(config-if)# end
Router# show ipv6 interface brief
GigabitEthernet0/1
[up/up]
Link-local unicast address
FE80::20C:30FF:FE10:92E1
only
Router#

Link-local addresses are automatically created whenever a global unicast


address is configured
The ipv6 enable command will:

Create a link-local address when there is no global unicast address


Maintain the link-local address even when the global unicast address is
removed
52

Pinging a Link-Local
Address
R1
FE80::1
2001:0DB8:ACAD:1::/64

G0/0

FE80::1

FE80::2

Ser 0/0/0
:1

Ser 0/0/0
:2

R2

2001:0DB8:ACAD:2::/64

R1# ping fe80::2


Output Interface: ser 0/0/0
Must include exit-interface
% Invalid interface. Use full interface name without
spaces (e.g. Serial0/1)
Output Interface: serial0/0/0
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to FE80::2, timeout is 2
secs:
!!!!!

53

IPv6 Topology
2001:0DB8:AAAA::/48
R1

Fa0/0 .1
FE80::1/64

2001:0DB8:AAAA:2::/64
Fa0/1 .1
FE80::1/64

R2

Fa0/0 .2
FE80::2/64

2001:0DB8:AAAA:1::/64

PC1

PC2

2001:0DB8:AAAA:1::200

2001:0DB8:AAAA:1::100
FE80::50A5:8A35:A5bb:66E1
54

Ping global unicast address from PC1 to R1


PC1> ping 2001:db8:aaaa:1::1
Pinging 2001:db8:aaaa:1::1 from 2001:db8:aaaa:1::100 with 32 bytes of
data:
Reply
Reply
Reply
Reply

from
from
from
from

2001:db8:aaaa:1::1:
2001:db8:aaaa:1::1:
2001:db8:aaaa:1::1:
2001:db8:aaaa:1::1:

time=1ms
time=1ms
time=1ms
time=1ms

Ping statistics for 2001:db8:aaaa:1::1:


Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 1ms, Maximum = 1ms, Average = 1ms
PC1>
55

Internet Protocol Version 6


Echo Request from PC1 to R1
0110 .... = Version: 6
.... 0000 0000 .... .... .... .... .... = Traffic class: 0x00000000
.... .... .... 0000 0000 0000 0000 0000 = Flowlabel: 0x00000000
Payload length: 40
Next header: ICMPv6 (0x3a)
Hop limit: 128
Source: 2001:db8:aaaa:1::100
Destination: 2001:db8:aaaa:1::1
Internet Control Message Protocol v6
Type: 128 (Echo (ping) request)
Code: 0 (Should always be zero)
Checksum: 0x8f38 [correct]
ID: 0x0001
Sequence: 0
Data (32 bytes)
56

Internet Protocol Version 6


Echo Reply from R1 to PC1
0110 .... = Version: 6
.... 0000 0000 .... .... .... .... .... = Traffic class: 0x00000000
.... .... .... 0000 0000 0000 0000 0000 = Flowlabel: 0x00000000
Payload length: 40
Next header: ICMPv6 (0x3a)
Hop limit: 64
Source: 2001:db8:aaaa:1::1
Destination: 2001:db8:aaaa:1::100
Internet Control Message Protocol v6
Type: 129 (Echo (ping) reply)
Code: 0 (Should always be zero)
Checksum: 0x8e38 [correct]
ID: 0x0001
Sequence: 0
Data (32 bytes)
57

Anda mungkin juga menyukai