Slalom parallelo IPv4 / IPv6

Lo Slalom parallelo di IPv4 e IPv6 è un confronto stretto tra 27 caratteristiche dei due protocolli, che ne mette in evidenza in modo chiaro e conciso le principali somiglianze e differenze.

Una Guida “rapida” di livello CCNP da tenere a portata di mano per ogni domanda sull’argomento.

1N. of address bits32128
2N. of addresses4.3 billions = 232340 undecillions, i.e. billions of billions of billions of billions=2128
3RepresentationDotted Decimal Notation8 groups of 4 hex digits/each; a group is also called an hextet
4Typical address192.168.0.12001:0db8:acad:0001:0000:0000:0000:1234
or 2001:db8:acad:1:0:0:0:1234
or  2001:db8:acad:1::1234
5CIDR – Classless Inter Domain Routing, or prefix lengthFrom /8 to /30 for nets and subnets but also < /8 for supernets; Cisco also accepts /31 subnets, and the /32 “host mask” (an IP alone)/48 for nets and /64 for subnets, but also < /48 for supernets, and /49 – /63 for subnet aggregation; subnets may have prefix > /64, at the nibble boundary (/68, /72…)
6Subnet MaskDotted Decimal Notation, with all “1” on the left, i.e. used: network portion is the “prefix length” only, i.e. /64
7ClassesClass A: 1st byte 0-127 (
Class B: 128-191 (
Class C: 192-223 (
(A, B & C are for Unicast traffic)
Class D: 224-239 (Multicast)
Class E: 240-255 (IANA reserved)
No Classes at all (so, no automatic summarization applies for IPv6 networks / addresses)
8N. of subnetsIt depends on the bits borrowed from the Host portion of the Major net; i.e. has 8 bits borrowed from a Class B net, so it’s one of 28 = 256 subnetsSubnets are normally 216 (65.536) for each net, or Site prefix (/48); all the fourth hextet is dedicated to the subnets definition, by default
9What ISPs allocate / sell to their customersSmall number of public addresses (no longer available) i.e. /32 for 1 address, /31 for 2 addresses, /30 for 4, /29 for 8, /28 for 16…
Small/residential users very often only receive one dynamic public address on their WAN link interface.
Normally, ISPs allocate /48 site prefixes to their customers, regardless of their “importance”. Each customer has then up to 65.536 subnets “for free”; if no subnets are used, set fourth hextet to 0, or to 1, or to ffff, or to any!
10N. of addresses per interfaceNormally only one (but secondary addresses can seldom be used)Normally, IPv6 interfaces have:
– a Link-local address alone, for local comm. only (i.e. FE80::1/64)
– a Global-unicast address, with a Link-local mate, for global comm.
Global-unicast addresses can be more than one; Link-local is one
11Size of the subnetsIt depends on the bits leaved in the Host portion of the address, after subnetting was possibly done. Major Class A nets have 224 = 16,7 millions IPs; /30 only have 4 IPsNormally, subnets have 64 bits in the IID-Interface ID portion of the address, the rightmost half of it. Thus, IPv6 subnets allow for 264 = 18.5 billions of billions of IPs
12Scopes of addressesUnicast (Classes A, B & C)
Multicast (Class D)
Broadcast (directed or limited
Unicast (different types –> see)
Multicast (FF00::/8); includes the “broadcast concept” (= FF02::1)
Anycast (these are Global-unicast assigned to different devices)
13Special and public addresses0.0.0.0/32 = unspecified IPv4 = reserved = loopback / local host
(16 million addresses… wasted) = private Class A network = private Class B network = private Class C network = APIPA-Automatic Private IP Addressing / Link-local
All other A-B-C Class are public
::/128 = unspecified IPv6
::1/128 = loopback / local host
(only 1 address of the… infinite)
FC00::/7 = Unique-local (ULA), routable only within their Site
FE80::/10 (RFC 4291: FE80::/64) = Link-local, non routable, only for local communication on a link
FF00::/8 = Multicast, of 5 scopes
2000::/3 = public Global-unicast (small parts of 2000::/4 assigned, mostly from 2001::/16)
14Documentation addresses192.0.2.0/24 …201.0 …202.0 and few others (seldom used)
2001:db8::/32, supplied by APNIC; third hextet is typically “acad”, “beef”, “cafe”, “feed”…
15NATDifferent uses of NAT allow:
– Client with private addresses to access the Web (dynamic + PAT)
– DMZ Servers to be reachable from the Web on public addresses
– merging of two networks with similar private addressing, etc.
No NAT is used for IPv6: Global-unicast addresses are public.
NAT64 is used for IPv4 – IPv6 coexistence in the short term, by replacement of Packet headers
16Layer 3 to Layer 2 address resolution protocolARP – A special Packet (Ethertype code 0x806) is sent to L2 broadcast (ff-ff-ff-ff-ff-ff), requesting the MAC address of the local node with a given IPND – Neighbor Discovery: a NS-Neighbor Solicitation ICMPv6 message (code 135) is sent to the target  node, requesting a NA-Neighbor Advertisement (code 136) from it, with its MAC address
17ICMP and PINGThe ICMPv4-Internet Control Message Protocol v4 includes up to 15 different message types (from 0 to 18, with holes); the most used types are: 0=Echo Reply, 3=Destination unreachable (with subcodes), 8=Echo Request and 11=Time Exceeded.  PING = 8 –> 0The ICMPv6 protocol includes many messages for functions similar to the ICMPv4 ones, plus the ND-Neighbor Discovery suite described above, including also the RS-Router Solicitation (code 133), RA-Router Advertisement (code 134) and Redirect (c. 137). PING = 135 –> 136
18Static address configuration methodsOnly one method is available: just configure the address and its Subnet Mask: that’s all, folks!Three static methods are available to setup a Global-unicast address:
– fully static: assign all 128 bits
– EUI-64: assign the /64 prefix and add eui-64: the IID is derived from a local MAC (see A1) or from the fully static Link-local
– random: only on Windows PCs
19How to enable the routing globally on Cisco IOSIPv4 is already enabled by default on Cisco Routers and Multilayer SwitchesTo turn a Router or a Multilayer Switch into a dual-stack device, use the command:
D(config)#ipv6 unicast-routing
20How to enable an interface on the protocol on Cisco IOSIPv4 is always enabled by default on Cisco Routers and Multilayer Switches routed interfaces; just add an IP and no shut to the interfaceBy adding the command: D(config)#ipv6 enable to an interface, it generates its EUI-64 Link-local address
21Dynamic address configuration methodsAfter ICMP, RARP and BOOTP made the history, today only the DHCP-Dynamic Host Configuration Protocol is available (RFC 2131 & 2132 for optional fields):
Cl.–>Se. DHCP Discover (L2 bro)
Se.–>Cl. DHCP Offer (L2 unicast)
Cl.–>Se. DHCP Request (L2 bro)
Se.–>Cl. DHCP Ack (L2 unicast).
Other messages are defined, i.e. Nak, Decline, Release and Inform.
DHCP can supply > 30 parameters
Again, three dynamic methods:
– SLAAC-StateLess Address AutoConfigura-tion: the node finds a Router on its link (–> FF02::2) and receives the prefix and D.G. (Router’s Link-local) + EUI-64
– Stateless DHCPv6: the same as above, but a DHCPv6 Server can add DNS, domain name, NTP, etc
– Stateful DHCPv6: the Router delegates the duty to a DHCPv6 Server (sometimes… to itself!)
22How to get a dynamic address under Cisco IOS D(config-if)#ip address dhcpReferring to the three methods:
– D(config-if)#ipv6 address autoconfig for methods 1 & 2
– D(config-if)#ipv6 address dhcp for Stateful DHCPv6 method
23How to route DHCP requests to a remote (helper) ServerD(config-if)#ip helper-address ipv4-address-of-Server on the interface receiving the DHCP Discover messagesD(config-if)#ipv6 relay destination ipv6-address-of-Server on the interface receiving the DHCPv6 Solicit messages
24D.V. routing protocols RIPv1, RIPv2, IGRP, EIGRPRIPng, EIGRP for IPv6
EIGRP is activated by no shut.
Networks are supplied to protocol in the D(config-if)# mode
25L.S. routing protocols OSPFv2, IS-ISOSPFv3 Networks are supplied to protocol in the D(config-if)# mode
26Packet HeaderIt is normally a 20 bytes header, with 12 fields (see A2), namely:
Vers.=4, IHL=5, ToS, Pkt length, Identif + Flags + Pkt offset (for Packet fragmentation), TTL, Protocol (i.e. 1=ICMP, 6=TCP, 17= UDP, 41=IPv6), Header checksum, Source address, Destination address
It is normally a 40 bytes header with 8 fields (see A3), namely:
Vers.=6, Traffic class, Flow label, Payload length, Next header, Hop limit, Source address, Destination address.
Additional Extension Headers can follow, for fragmentation, VPN…
27EthertypeThe 16 bits code used by Layer 2 protocols to identify IPv4 is 0x800 = 0000 1000 0000 0000The 16 bits code used by Layer 2 protocols to identify IPv6 is 0x86DD = 1000 0110 1101 1101



A1 – EUI-64 method to generate a unique IID for IPv6 addresses


A2 – IPv4 Packet Header


A3 – IPv6 Packet Header