Course contents

Chapter 8: RoutingLesson 9 of 16

Lab: IPv6 addressing and static routes

Address two routers, route between three IPv6 networks in both directions, check what a PC learns by SLAAC, and fix the common faults.

Intermediate · 20 min read

Technical definition

SLAAC (Stateless Address Autoconfiguration) is the IPv6 method in which a host learns its network prefix and default gateway from a router's Router Advertisements and creates its own interface ID, without a DHCP server keeping track of addresses.

An office adding IPv6 beside IPv4

A small office is adding IPv6 next to its IPv4 network. PC1's LAN is behind R1, the server LAN is behind R2, and the two routers share a link. The PCs use SLAAC. Your job is to make PC1 reach the server at 2001:db8:acad:2::10 over IPv6.

RouterInterfaceGlobal addressLink-local
R1Gi0/0 (PC1 LAN)2001:db8:acad:1::1/64fe80::1
Gi0/1 (to R2)2001:db8:acad:12::1/64fe80::1
R2Gi0/1 (to R1)2001:db8:acad:12::2/64fe80::2
Gi0/0 (server LAN)2001:db8:acad:2::1/64fe80::2

The same link-local address on two interfaces of one router is fine: a link-local address only has to be unique on its own link.

Task 1: configure R1 and R2

Three things on each router: IPv6 routing, the addresses, and a route to the network on the far side. Write them before you look.

Show the configuration
ipv6 unicast-routing ! interface GigabitEthernet0/0 ipv6 address 2001:db8:acad:1::1/64 ipv6 address fe80::1 link-local no shutdown interface GigabitEthernet0/1 ipv6 address 2001:db8:acad:12::1/64 ipv6 address fe80::1 link-local no shutdown ! ipv6 route 2001:db8:acad:2::/64 2001:db8:acad:12::2

R1: a global next hop needs no exit interface.

ipv6 unicast-routing ! interface GigabitEthernet0/0 ipv6 address 2001:db8:acad:2::1/64 ipv6 address fe80::2 link-local no shutdown interface GigabitEthernet0/1 ipv6 address 2001:db8:acad:12::2/64 ipv6 address fe80::2 link-local no shutdown ! ipv6 route 2001:db8:acad:1::/64 GigabitEthernet0/1 fe80::1

R2: the return route uses R1's link-local address, so the exit interface is required.

Task 2: verify the routers

Example output written for this lab, based on Cisco IOS documentation
R1#show ipv6 interface brief
GigabitEthernet0/0     [up/up]
    FE80::1
    2001:DB8:ACAD:1::1
GigabitEthernet0/1     [up/up]
    FE80::1
    2001:DB8:ACAD:12::1
Each interface is up/up with its link-local address first and its global address below.
Example output written for this lab, based on Cisco IOS documentation
R2#show ipv6 route static
IPv6 Routing Table - default - 6 entries
Codes: C - Connected, L - Local, S - Static, U - Per-user Static route
       ...
S   2001:DB8:ACAD:1::/64 [1/0]
     via FE80::1, GigabitEthernet0/1

Task 3: check what PC1 learned

Example output from a Windows PC, written for this lab
C:\> ipconfig
Ethernet adapter Ethernet:

   IPv6 Address. . . . . . . . . . . : 2001:db8:acad:1:5d1c:7e2a:93b4:10f7
   Link-local IPv6 Address . . . . . : fe80::5d1c:7e2a:93b4:10f7%12
   Default Gateway . . . . . . . . . : fe80::1%12
Read it before opening the questions below.
Why is the gateway fe80::1 and not 2001:db8:acad:1::1?

Router Advertisements are sent from the router's link-local address, so hosts use that as their default gateway. Separately, the interface ID isn't built from the MAC address: Windows chooses a random one by default, not EUI-64. %12 is the Windows interface index, needed because a link-local address only means something on one interface.

Task 4: break it on purpose

Pick a fault and follow the packet from PC1 to the server. Decide what PC1 would see before you watch.

Diagram
IPv6 from PC1 to the server
IPv6 from PC1 to the server
Fault:
Gi0/0Gi0/1Gi0/12001:db8:acad:12::/64Gi0/0PC1IPv6 2001:db8:acad:1::/64R1IPv6 fe80::1R2IPv6 fe80::2ServerIPv6 2001:db8:acad:2::10Frame02:00:00:00:01:10 → 02:00:00:00:00:01Packet2001:db8:acad:1:5d1c:7e2a:93b4:10f7 → 2001:db8:acad:2::10ICMPv6 echo request

Device key: PC1 (computer) · R1, R2 (router)

Lines show the example’s network connections. The coloured path and envelope follow the current step; its text identifies the sender, receiver and traffic type.

Reading the addresses

IP labels identify interfaces or destinations. Subnet labels identify networks; /n is the prefix length. A router ID (RID) identifies a routing process and need not be a reachable interface.

An IP address alone is not a URL. A web URL includes a scheme such as https://; an address on a router or printer does not imply a website.

MAC addresses identify link-layer interfaces or destination groups. They are not IP addresses or website URLs.

  • PC1: IPv6 2001:db8:acad:1::/64
  • R1: IPv6 fe80::1
  • R2: IPv6 fe80::2
  • Server: IPv6 2001:db8:acad:2::10

Frame 02:00:00:00:01:10 to 02:00:00:00:00:01. Packet 2001:db8:acad:1:5d1c:7e2a:93b4:10f7 to 2001:db8:acad:2::10.

  1. 1. To the gateway: the server is off-link, so PC1 sends the packet to its default gateway, R1.
  2. 2. Routed: R1 uses its static route via 2001:db8:acad:12::2; R2 delivers to its connected server LAN.
  3. 3. And back: R2 uses its return route via fe80::1 on Gi0/1. Ping succeeds.
A ping needs a route there and a route back.

A useful habit from the field: when a ping from the router works but a ping from a PC behind it doesn't, check the return route on the far router before anything else.

Test yourself on IPv6 static routes

Predict · scenario 1

On R2 you type ipv6 route 2001:db8:acad:1::/64 fe80::1. What happens?

Predict · scenario 2

PC1 shows only a link-local address and no IPv6 default gateway. R1's Gi0/0 has 2001:db8:acad:1::1/64 and is up/up. What do you check first?

Predict · scenario 3

On R1, ping 2001:db8:acad:2::10 works, but ping 2001:db8:acad:2::10 source GigabitEthernet0/0 fails. What is missing?