Configuring IPv6 on a router

Three commands

CommandWhereWhat it does
ipv6 unicast-routingglobal configLets the router forward IPv6 and send Router Advertisements. Off by default!
ipv6 address 2001:db8:acad:10::1/64interfaceA global address, typed in full
ipv6 address 2001:db8:acad:20::/64 eui-64interfaceOnly the prefix: the router builds the interface ID from its MAC
ipv6 address fe80::1 link-localinterfaceReplace the automatic link-local address with an easy one

In NetLab

▶ R1
R1>enable
R1#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#ipv6 unicast-routing
R1(config)#interface g0/0
R1(config-if)#ipv6 address 2001:db8:acad:10::1/64
R1(config-if)#ipv6 address fe80::1 link-local
R1(config-if)#no shutdown
*Mar  1 00:00:07.000: %LINK-3-UPDOWN: Interface GigabitEthernet0/0, changed state to up
*Mar  1 00:00:07.000: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to up
R1(config-if)#interface g0/1
R1(config-if)#ipv6 address 2001:db8:acad:20::/64 eui-64
R1(config-if)#no shutdown
*Mar  1 00:00:10.000: %LINK-3-UPDOWN: Interface GigabitEthernet0/1, changed state to up
*Mar  1 00:00:10.000: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1, changed state to up
R1(config-if)#end
*Mar  1 00:00:11.000: %SYS-5-CONFIG_I: Configured from console by console
R1#show ipv6 interface brief
GigabitEthernet0/0     [up/up]
    FE80::1
    2001:DB8:ACAD:10::1
GigabitEthernet0/1     [up/up]
    FE80::21A:63FF:FE44:34F5
    2001:DB8:ACAD:20:21A:63FF:FE44:34F5
GigabitEthernet0/2     [administratively down/down]
    unassigned

Gi0/1's addresses both end in the same 64 bits, built from its MAC address. That is EUI-64.

How EUI-64 works

A MAC address is only 48 bits, but the interface ID needs 64. EUI-64 stretches the MAC:

  1. Split the MAC in half: 001a.63 | 44.34f5.
  2. Put fffe in the middle: 001a:63ff:fe44:34f5.
  3. Flip the 7th bit of the first byte (the universal/local bit): 00 = 0000 0000 → 0000 0010 = 02, so 021a:63ff:fe44:34f5, written 21a:63ff:fe44:34f5.

Tip: The quick way to flip the 7th bit: look at the second hex digit of the MAC and add or subtract 2. 0↔2, 4↔6, 8↔a, c↔e. So a MAC starting 00 gives 02, and a8 gives aa.

The IPv6 routing table

Like IPv4, each address adds a C (connected network) and an L (local, the router's own /128) route:

In NetLab

▶ R1
R1>enable
R1#show ipv6 route
IPv6 Routing Table - default - 5 entries
Codes: C - Connected, L - Local, S - Static, U - Per-user Static route
       B - BGP, R - RIP, H - NHRP, I1 - ISIS L1
       I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary, D - EIGRP
       EX - EIGRP external, ND - ND Default, NDp - ND Prefix, DCE - Destination
       NDr - Redirect, O - OSPF Intra, OI - OSPF Inter, OE1 - OSPF ext 1
       OE2 - OSPF ext 2, ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
       la - LISP alt, lr - LISP site-registrations, ld - LISP dyn-eid
       a - Application
C   2001:DB8:ACAD:10::/64 [0/0]
     via GigabitEthernet0/0, directly connected
L   2001:DB8:ACAD:10::1/128 [0/0]
     via GigabitEthernet0/0, receive
C   2001:DB8:ACAD:20::/64 [0/0]
     via GigabitEthernet0/1, directly connected
L   2001:DB8:ACAD:20::1/128 [0/0]
     via GigabitEthernet0/1, receive
L   FF00::/8 [0/0]
     via Null0, receive

Common mistake: Forgetting ipv6 unicast-routing is the classic IPv6 mistake. The interfaces still get addresses and you can ping them, but the router won't forward IPv6 between them and won't send Router Advertisements, so PCs can't configure themselves.

HOME LABS COMMUNITY DASHBOARD