From point A to point B
Point A: you have mastered IPv4, its masks and its routes, but an address like 2001:db8:acad:1::1 still looks like a secret code and you do not know how a PC finds its router without DHCP or ARP. Point B: by the end you will read and shorten any IPv6 address, recognize its type from the prefix, work out an interface ID with EUI-64, explain how Neighbor Discovery works and configure IPv6 addresses and static routes on a Cisco router.
This chapter covers three v1.1 exam topics. In the Network Fundamentals domain (20%): 1.8, configure and verify IPv6 addressing and prefix, and 1.9, describe IPv6 address types: unicast (global, unique local and link local), anycast, multicast and modified EUI-64. In the IP Connectivity domain (25%): 3.3, configure and verify IPv6 static routing. OSPFv3 shows up in the last lab and we explain it here as context.
Why IPv6
IPv4 has 32 bits: about 4.3 billion addresses. IANA handed out its last free IPv4 blocks in 2011, the regional registries ran through theirs in the years that followed, and today networks get by thanks to NAT and the market for used addresses. IPv6, defined today in RFC 8200, uses 128 bits: 2128, about 3.4 × 1038 addresses. That is enough for every device to have a public address with no translation.
But IPv6 is not just “IPv4 with more bits”. It changes several things at once:
| Aspect | IPv4 | IPv6 |
|---|---|---|
| Address size | 32 bits, dotted decimal | 128 bits, hexadecimal with colons |
| Header | Variable, 20 to 60 bytes, with checksum | Fixed 40 bytes, no checksum; options go in extension headers |
| Broadcast | Yes | Does not exist: multicast is used |
| Address resolution | ARP | Neighbor Discovery (ICMPv6) |
| Fragmentation | Source and routers | Source only; routers do not fragment |
| Autoconfiguration | DHCP | SLAAC, DHCPv6 or both |
| TTL | Time to Live | Hop Limit |
IPv4 and IPv6 are not compatible with each other: a device that only speaks IPv4 does not understand an IPv6 packet. That is why the transition uses dual stack (each interface has an IPv4 and an IPv6 address, as in this chapter’s labs), tunnels that carry IPv6 inside IPv4, or translation such as NAT64.
The address format
An IPv6 address is written as 8 groups of 4 hexadecimal digits separated by colons. Each hexadecimal digit is 4 bits, so each group, called a hextet, is 16 bits: 8 × 16 = 128.
The three parts of an IPv6 address on a /64 subnet. Diagram: The House of Routing.
Hexadecimal runs from 0 to F: A = 10, B = 11, C = 12, D = 13, E = 14 and F = 15. Letters can be upper or lower case; RFC 5952 recommends writing them in lower case, which is how current operating systems show them. In the examples we use 2001:DB8::/32, reserved for documentation (RFC 3849), and in the labs made-up prefixes such as 2001:AAAA::/64.
How to shorten it
Writing 32 digits is tedious, so there are two rules to shorten an address. They are applied in this order:
- Drop the leading zeros of each hextet. 0DB8 becomes DB8, 0008 becomes 8 and 0000 becomes 0. Trailing zeros are never dropped: 2000 stays 2000.
- Replace, only once, with
::a run of consecutive hextets that are 0. If there are several, pick the longest; if they tie, the first.
Both rules applied to the same address. Diagram: The House of Routing.
The :: can appear only once. If 2001:0:0:1:0:0:0:1 were written 2001::1::1, nobody could tell whether the first :: stands for two zeros and the second for three, or the other way round. The correct form is 2001:0:0:1::1. RFC 5952 adds that :: is not used for a single zero hextet: 2001:db8:0:1:1:1:1:1 stays as it is.
To expand a shortened address, count the hextets you see and fill in 0000 hextets until there are 8:
| Shortened | Full |
|---|---|
2001:db8:acad:1::1 | 2001:0db8:acad:0001:0000:0000:0000:0001 |
fe80::201:42ff:feb8:4e3b | fe80:0000:0000:0000:0201:42ff:feb8:4e3b |
ff02::1:ff00:1 | ff02:0000:0000:0000:0000:0001:ff00:0001 |
::1 | 0000:0000:0000:0000:0000:0000:0000:0001 |
:: | 0000:0000:0000:0000:0000:0000:0000:0000 |
Prefix, subnet and interface ID
IPv6 does not use dotted-decimal masks: it writes the prefix length after a slash, just like IPv4 CIDR notation. In 2001:db8:acad:1::1/64, the first 64 bits identify the network and the other 64 the device.
- Global routing prefix: assigned to your organization by the provider. A /48 for a business or a /56 for a home is typical.
- Subnet ID: the bits from the end of the prefix up to bit 64. With a /48 you have 16 bits left: 65,536 /64 subnets.
- Interface ID: the last 64 bits, the equivalent of the IPv4 host part.
LANs almost always use /64: it is the size SLAAC requires and the one most devices expect. On links between two routers you may see /64, /127 (RFC 6164) or /126. To subnet, the most practical approach is to change the fourth hextet: 2001:db8:acad:1::/64, 2001:db8:acad:2::/64, 2001:db8:acad:3::/64 and so on.
:: at the end.Address types
IPv6 has three families: unicast (one to one), multicast (one to a group) and anycast (one to the nearest member of a group). Broadcast is gone. Also, a single interface has several addresses at once: at least one link-local, usually one global and several multicast.
IPv6 address types and their prefixes. Diagram: The House of Routing.
Global unicast (GUA)
These are the public addresses, unique across the whole internet. Today they are assigned from 2000::/3: they all start with 2 or 3 in the first hexadecimal digit. They are the equivalent of public IPv4 addresses, without the shortage.
Unique local (ULA)
The FC00::/7 block (RFC 4193) is the equivalent of the RFC 1918 private IPv4 networks: it works inside the organization and is not routed on the internet. In practice FD00::/8 is used, with 40 random bits so that two companies that merge do not collide. Do not confuse them with the old site-local addresses, FEC0::/10, which RFC 3879 deprecated.
Link-local (LLA)
They start with FE80::/10 and are only valid on their link: a router never forwards them. Every IPv6 interface creates its own automatically, even without a global address. They are used to talk to neighbors on the same link: routing protocols use them as source and next hop, and hosts use the router’s link-local as their default gateway. Since they all start with FE80, the same address can repeat on several interfaces of a router: that is why, when you ping a link-local, the router asks you for the outgoing interface.
Multicast
They start with FF00::/8. They replace broadcast: only devices that joined the group process the packet. The second byte shows the scope; FF02 is link scope. These are the ones you will see most:
| Address | Group |
|---|---|
FF02::1 | All nodes on the link (the closest thing to broadcast) |
FF02::2 | All routers on the link |
FF02::5 and FF02::6 | OSPFv3 routers, and OSPFv3 DR and BDR |
FF02::A | EIGRP for IPv6 routers |
FF02::1:2 | DHCPv6 servers and relay agents |
FF02::1:FF00:0/104 | Solicited node (you will see it below) |
Anycast and special addresses
An anycast address is a unicast address configured on several devices; routing takes each packet to the nearest one. That is how the DNS root servers work, for example. In Cisco IOS you mark it with the keyword anycast at the end of ipv6 address. Two special ones remain: ::1/128, the loopback, and ::/128, the unspecified address, which a device uses as source before it has an address. Do not confuse ::/128 with ::/0, the default route.
Modified EUI-64
The 64-bit interface ID can be configured by hand, generated at random or derived from the MAC with modified EUI-64 (RFC 4291). The calculation has three steps:
- Split the 48-bit MAC into two 24-bit halves.
- Insert FFFE in the middle: now you have 64 bits.
- Flip the seventh bit of the first byte, the universal/local (U/L) bit. If it was 0 it becomes 1, and vice versa.
EUI-64 step by step with MAC 1034.5678.9ABC. Diagram: The House of Routing.
To flip the seventh bit, write the first byte in binary. 10 hex is 0001 0000; the seventh bit (from left to right) is the second to last, so it becomes 0001 0010 = 12. A shortcut: the second hexadecimal digit changes according to this table, and the first one stays.
| If the second digit is | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| It becomes | 2 | 3 | 0 | 1 | 6 | 7 | 4 | 5 | A | B | 8 | 9 | E | F | C | D |
You can check it in lab 1: the interface with MAC 0001.42B8.4E3B has the link-local FE80::201:42FF:FEB8:4E3B. The 00 became 02, FFFE was inserted and the leading zeros were dropped.
Neighbor Discovery
Neighbor Discovery (NDP, RFC 4861) is a set of ICMPv6 messages that replaces ARP and adds functions IPv4 did not have. In IPv6, blocking all ICMP breaks the network.
The four NDP messages the CCNA tests. Diagram: The House of Routing.
| ICMPv6 type | Message | Who sends it, and where | What it is for |
|---|---|---|---|
| 133 | Router Solicitation (RS) | The host, to FF02::2 | Asks routers to announce themselves now, without waiting |
| 134 | Router Advertisement (RA) | The router, to FF02::1 (or to the host that asked) | Announces the prefix, its length, the gateway and how to autoconfigure |
| 135 | Neighbor Solicitation (NS) | Any node, to the solicited-node multicast | Asks for the MAC of an IPv6 address (like an ARP request) and performs DAD |
| 136 | Neighbor Advertisement (NA) | The owner of the address, in unicast | Replies with its MAC (like an ARP reply) |
| 137 | Redirect | The router, to the host | Points it to a better next hop |
Cisco routers send RAs every 200 seconds by default on IPv6 interfaces, but only if ipv6 unicast-routing is enabled. Learned MACs are kept in the neighbor cache, the equivalent of the ARP table:
R_CCS# show ipv6 neighbors
IPv6 Address Age Link-layer Addr State Interface
2001:AAAA::10 0 0060.47a1.2b3c REACH Fa0/0
FE80::260:47FF:FEA1:2B3C 0 0060.47a1.2b3c REACH Fa0/0
Solicited node and DAD
If NS used FF02::1, every device on the link would have to process it, as happens with ARP. IPv6 avoids that with the solicited-node multicast address: for each unicast address, the interface joins the group made of the prefix FF02::1:FF00:0/104 plus the last 24 bits of that unicast. Since two devices rarely share those 24 bits, in practice only the target device receives the NS.
From a unicast to its solicited-node multicast, and how DAD uses it. Diagram: The House of Routing.
To work it out, take the last 6 hexadecimal digits of the address, pad with zeros if needed, and append them to FF02::1:FF. Examples: 2001:db8:acad:1::1 → FF02::1:FF00:1; FE80::201:42FF:FEB8:4E3B → FF02::1:FFB8:4E3B.
Duplicate address detection (DAD)
Before using a unicast address, whether manual, SLAAC or DHCPv6, the interface checks that nobody else has it. It sends an NS from :: (it cannot use the address yet) to the solicited-node multicast of the address it wants to use. If someone answers with an NA, the address is a duplicate and is not used; in Cisco IOS you will see it marked [DUP]. If nobody answers, the address goes into use.
SLAAC and DHCPv6
A host can have its IPv6 address configured by hand or learn it in three dynamic ways. They all start the same: the host sends an RS and the router answers with an RA.
The three dynamic methods and the RA flags. Diagram: The House of Routing.
- SLAAC (stateless address autoconfiguration, RFC 4862): the host takes the /64 prefix from the RA, adds its interface ID (EUI-64 or random), runs DAD and is done. No server keeps track of which address each host has: that is why it is “stateless”.
- Stateless DHCPv6: the address comes from SLAAC, but the host asks a DHCPv6 server for the other data, such as DNS and the domain name. The RA has the O flag (other configuration) set to 1.
- Stateful DHCPv6: the server assigns the full address and keeps the record, like DHCP in IPv4. The RA has the M flag (managed) set to 1.
In all three cases, the host learns its default gateway from the RA: it is the link-local of the router that sent it. DHCPv6 does not hand out a gateway. On a Cisco router, the flags are set per interface:
R1(config)# interface gigabitethernet0/0
R1(config-if)# ipv6 nd other-config-flag ! O = 1: stateless DHCPv6
R1(config-if)# ipv6 nd managed-config-flag ! M = 1: stateful DHCPv6
A router can also autoconfigure one of its interfaces as if it were a host, with ipv6 address autoconfig (SLAAC) or ipv6 address dhcp, which is common on the interface facing the provider.
Configuring IPv6 on a router
In lab 1 you work with two dual-stack branches, Caracas and New York. Each router has a LAN, and they share network 2001:BBBB::/64 over a point-to-point Frame Relay subinterface, Serial0/0/0.1.
R_CCS(config)# ipv6 unicast-routing
R_CCS(config)# interface fastethernet0/0
R_CCS(config-if)# ipv6 address 2001:AAAA::1/64
R_CCS(config-if)# ipv6 address fe80::1 link-local
R_CCS(config-if)# no shutdown
R_CCS(config-if)# interface serial0/0/0.1
R_CCS(config-if)# ipv6 address fe80::1 link-local
ipv6 unicast-routingturns the device into an IPv6 router: it forwards IPv6 packets and sends RAs. Without this command the interfaces have addresses but the router does not route. It is the most common oversight.ipv6 addressaddress/prefix assigns a global address with the interface ID you choose. An interface can have several.- With
ipv6 address 2001:aaaa::/64 eui-64you write only the prefix and the router works out the interface ID with EUI-64. - The link-local is created on its own when you configure any IPv6 address or the
ipv6 enablecommand. Withipv6 address fe80::1 link-localyou set it by hand: that makes it easy to read and to use as a next hop. You can repeat the same link-local on every interface of the router, because each one lives on its own link; on R_NYC you would use FE80::2.
To verify, these are the key commands:
R_CCS# show ipv6 interface brief
FastEthernet0/0 [up/up]
FE80::1
2001:AAAA::1
Serial0/0/0.1 [up/up]
FE80::1
2001:BBBB::1
R_CCS# show ipv6 interface fastethernet0/0
FastEthernet0/0 is up, line protocol is up
IPv6 is enabled, link-local address is FE80::1
Global unicast address(es):
2001:AAAA::1, subnet is 2001:AAAA::/64
Joined group address(es):
FF02::1
FF02::2
FF02::1:FF00:1
Look at the groups: FF02::1 (all nodes), FF02::2 (all routers, because ipv6 unicast-routing is on) and FF02::1:FF00:1, the solicited-node address that matches both 2001:AAAA::1 and FE80::1, because they end the same way.
On a Windows PC, ipconfig shows the address, the link-local with its zone ID (for example fe80::1%12) and the gateway. In Packet Tracer you set the address in Desktop → IP Configuration, statically or with Automatic to use SLAAC.
IPv6 static routes
IPv6 static routes work like the IPv4 ones from chapter 5, with the ipv6 route command and the prefix in slash notation.
The lab 1 topology with its two static routes. Diagram: The House of Routing.
! Next hop with a global address
R_CCS(config)# ipv6 route 2001:CCCC::/64 2001:BBBB::2
! Exit interface (point-to-point links only)
R_CCS(config)# ipv6 route 2001:CCCC::/64 serial0/0/0.1
! Fully specified: required with link-local
R_CCS(config)# ipv6 route 2001:CCCC::/64 serial0/0/0.1 fe80::2
! Default route
R_CCS(config)# ipv6 route ::/0 2001:BBBB::2
! Floating backup route, administrative distance 200
R_CCS(config)# ipv6 route ::/0 2001:DDDD::2 200
! Host route
R_CCS(config)# ipv6 route 2001:CCCC::10/128 2001:BBBB::2
An important rule: if the next hop is a link-local, you must also give the exit interface. Since the same FE80::2 can exist on several links, the router needs to know which one to use. With a global address it is not needed: the router looks up in its table which interface reaches it.
R_CCS# show ipv6 route static
IPv6 Routing Table - 6 entries
Codes: C - Connected, L - Local, S - Static, O - OSPF Intra, ...
S 2001:CCCC::/64 [1/0]
via 2001:BBBB::2
The IPv6 table uses the same codes as IPv4: C for the connected network, L for the local address as a /128 route, S for static and O for OSPF. The administrative distance of a static route is 1. You will also see an L FF00::/8 route to Null0: that is normal. Then test end to end with ping and traceroute to an IPv6 address.
OSPFv3
OSPFv3 (RFC 5340) is the version of OSPF for IPv6. It works like the OSPFv2 from chapter 6, with neighbors, LSDB, SPF, areas, cost and DR and BDR, but some details change. The v1.1 exam topics ask you to configure OSPFv2; you see OSPFv3 in lab 2 as the next step.
| OSPFv2 | OSPFv3 | |
|---|---|---|
| Network protocol | IPv4 | IPv6 (and, with address families, IPv4 too) |
| Enabled with | network or on the interface | Only on the interface, with ipv6 ospf 1 area 0 |
| Packet source | The interface’s IPv4 address | The interface’s link-local |
| Multicast | 224.0.0.5 and 224.0.0.6 | FF02::5 and FF02::6 |
| Router ID | 32 bits | Also 32 bits, in IPv4 format: if the router has no IPv4, set it by hand |
| Authentication | OSPF’s own | IPsec, or the RFC 7166 authentication trailer |
R_PTO(config)# ipv6 unicast-routing
R_PTO(config)# ipv6 router ospf 1
R_PTO(config-rtr)# router-id 1.1.1.1
R_PTO(config-rtr)# exit
R_PTO(config)# interface fastethernet0/0
R_PTO(config-if)# ipv6 ospf 1 area 0
R_PTO(config-if)# interface serial0/0/0.1
R_PTO(config-if)# ipv6 ospf 1 area 0
R_PTO# show ipv6 ospf neighbor
R_PTO# show ipv6 route ospf
If the router already has an IPv4 address, as in the lab, it takes the router ID from there; if it has none, OSPFv3 does not start until you configure router-id. In the routing table, the next hop of the O routes is the neighbor’s link-local.
For your notes. The four most common IPv6 mistakes: forgetting ipv6 unicast-routing, using :: twice, writing a route with a link-local next hop but no interface, and setting a PC’s gateway to an address that does not belong to the router.
What you take away
- IPv6 has 128 bits in 8 hextets of 16 bits; it has no broadcast and no ARP, and routers do not fragment.
- To shorten: drop leading zeros and use :: only once, on the longest run of zeros.
- On a /64 LAN, 64 bits are network (global prefix and subnet ID) and 64 are the interface ID.
- Prefixes: GUA 2000::/3, ULA FC00::/7 (FD00::/8), link-local FE80::/10, multicast FF00::/8, loopback ::1, unspecified ::.
- EUI-64: split the MAC, insert FFFE and flip the seventh bit.
- NDP uses ICMPv6: RS 133, RA 134, NS 135, NA 136. It replaces ARP and announces routers.
- Solicited node: FF02::1:FF plus the last 24 bits. DAD sends an NS from :: before using an address.
- SLAAC takes the prefix from the RA; the O and M flags call for stateless or stateful DHCPv6. The gateway comes from the RA.
ipv6 unicast-routingis required to route and to send RAs.ipv6 routeprefix next-hop; with a link-local, add the exit interface. ::/0 is the default route.
In the next chapter you move on to wireless networks: how data travels through the air, which architectures and AP modes exist and how they are protected with WPA2 and WPA3.
Slides
These slides support the guided class: view them here, full screen, or download the PDF for your notes. Part 1 goes with videos 1, 2 and 3; Part 2 with videos 4 and 5, and Part 3 with the guided labs in videos 6 to 9.
Class videos
The videos are in Spanish. The translation of the videos is in development.
Each part of the chapter has its own video. Tap a card and the video opens right here, over the page; use the Close button or the Esc key to go back to where you were. Use them alongside the slides of the same part.
- Chapter 7 · Part 1IPv6 featuresWatch video
- Chapter 7 · Part 2Reading and shortening IPv6 addressesWatch video
- Chapter 7 · Part 3The interface ID with EUI-64Watch video
- Chapter 7 · Part 4Neighbor Discovery: NS, NA and DADWatch video
- Chapter 7 · Part 5Router Discovery: RS, RA and SLAACWatch video
- Chapter 7 · Part 6Lab: link-local addressesWatch video
- Chapter 7 · Part 7Lab: global unicast addressesWatch video
- Chapter 7 · Part 8Lab: IPv6 static routingWatch video
- Chapter 7 · Part 9Lab: IPv6 with OSPFv3Watch video
When you play a video, it loads from YouTube (no cookies until you open it). See the full playlist on YouTube.
Packet Tracer labs
The labs are in Spanish. The translation of the labs is in development.
Download each lab's files and open them with Cisco Packet Tracer. Tap the name to see the two downloads.
Lab 1IPv6 addresses and static routes
Two dual-stack branches, Caracas and New York, joined by Frame Relay: R_CCS has LAN 2001:AAAA::/64 and R_NYC has 2001:CCCC::/64, with link 2001:BBBB::/64. The addresses and static routes are already there, but ipv6 unicast-routing is missing. Check the link-local addresses and EUI-64 with show ipv6 interface brief, enable routing on both routers, verify with show ipv6 route and ping from PC01_CCS (2001:AAAA::10) to PC01_NYC (2001:CCCC::10). The file has no passwords.
Lab 2IPv6 routing with OSPFv3
The Puerto Ordaz and Miami branches, joined by Frame Relay on network 2001:172:16:2::/64. You enable ipv6 unicast-routing on R_PTO and R_MIA and OSPFv3 with ipv6 ospf 1 area 0 on their FastEthernet0/0 and their Serial0/0/0.1 subinterface. Then you test with ping from PC_PTO_01 to the WEB_SERVER (2001:172:16:3::100) and the DNS_SERVER in Miami. The graded activity measures your progress. Console and enable password: ipv6.
Chapter assessment
There are 100 single-choice questions, split into 10 tabs of 10. Each tab mixes every topic in the chapter and rises in level: questions 1 to 3 are low difficulty, 4 to 8 are medium and 9 to 10 are high.
We do not save your answers. They run in your browser and, if you close or reload the page, you start from zero. Getting it wrong here is the cheapest way to learn.
Additional resources
These links take you to official sites outside this portal. Use them to practice, go further and confirm what you learned.
To study and practice
- Cisco U.: Implementing and Administering Cisco Solutions (CCNA) pathu.cisco.com
- Cisco Learning Network: community, forums and study resourceslearningnetwork.cisco.com
- Cisco Packet Tracer at Networking Academynetacad.com
Exam and certification
- Official CCNA 200-301 v1.1 exam topics (PDF)learningcontent.cisco.com
- Official CCNA certification pagecisco.com
Reference documentation
- RFC 4291: IP Version 6 Addressing Architecturerfc-editor.org
- RFC 4861: Neighbor Discovery for IP version 6rfc-editor.org
- RFC 5952: A Recommendation for IPv6 Address Text Representationrfc-editor.org
Source and credits. Chapter built from the notes “IPv6” and the slide deck “IPv6” (CCNA 200-301, part 7) by Jesús Espinoza, and from the lab guides of the 1st International IPv6 Seminar, Guayana Region (2011), paraphrased, updated and aligned with the official CCNA 200-301 v1.1 exam topics. Text written with AI assistance; original diagrams by The House of Routing. Technical details were checked against official Cisco documentation and RFCs 8200, 4291, 4861, 4862, 4193, 5952 and 5340.
