Octet

Run OSPFv3 between two routers and advertise their LANs

Cisco IOSWorking

Tasks

  1. Enable IPv6 routing and address the interfaces, with readable link-local addresses.
  2. Start OSPFv3 process 1 with a manual router ID on each router.
  3. Enable OSPFv3 in area 0 on the LAN and transit interfaces.
  4. Make the LAN interfaces passive and the transit link point-to-point.
  5. Verify the adjacency, the routes and end-to-end reachability.

Solution

  1. 1Routing and addresses on R1R1
    R1 on Cisco IOS
    ipv6 unicast-routing
    !
    interface GigabitEthernet0/0/0
     ipv6 address fe80::1 link-local
     ipv6 address 2001:db8:acad:10::1/64
     no shutdown
    !
    interface GigabitEthernet0/0/1
     ipv6 address fe80::1 link-local
     ipv6 address 2001:db8:acad:ff::1/64
     no shutdown

    In production the transit link would use a /127. A /64 keeps the lab easy to read.

  2. 2OSPFv3 process on R1R1
    R1 on Cisco IOS
    router ospfv3 1
     router-id 1.1.1.1
     address-family ipv6 unicast
      passive-interface GigabitEthernet0/0/0
     exit-address-family

    The router ID is a 32-bit number. With no IPv4 address on the box, OSPFv3 cannot pick one by itself and will not run.

  3. 3Enable OSPFv3 on R1's interfacesR1
    R1 on Cisco IOS
    interface GigabitEthernet0/0/0
     ospfv3 1 ipv6 area 0
    !
    interface GigabitEthernet0/0/1
     ospfv3 network point-to-point
     ospfv3 1 ipv6 area 0

    Point-to-point skips the DR election and its wait time on a link with only two routers.

  4. 4Same on R2R2
    R2 on Cisco IOS
    ipv6 unicast-routing
    !
    interface GigabitEthernet0/0/0
     ipv6 address fe80::2 link-local
     ipv6 address 2001:db8:acad:20::1/64
     ospfv3 1 ipv6 area 0
     no shutdown
    !
    interface GigabitEthernet0/0/1
     ipv6 address fe80::2 link-local
     ipv6 address 2001:db8:acad:ff::2/64
     ospfv3 network point-to-point
     ospfv3 1 ipv6 area 0
     no shutdown
    !
    router ospfv3 1
     router-id 2.2.2.2
     address-family ipv6 unicast
      passive-interface GigabitEthernet0/0/0
     exit-address-family

Verify

R1 output
R1# show ospfv3 neighbor
          OSPFv3 1 address-family ipv6 (router-id 1.1.1.1)

Neighbor ID     Pri   State           Dead Time   Interface ID    Interface
2.2.2.2           0   FULL/  -        00:00:35    6               GigabitEthernet0/0/1

FULL with no DR role (the dash), as expected on a point-to-point link. The neighbor is named by router ID.

R1 output
R1# show ospfv3 interface brief
Interface    PID   Area            AF         Cost  State Nbrs F/C
Gi0/0/1      1     0               ipv6       1     P2P   1/1
Gi0/0/0      1     0               ipv6       1     DR    0/0

The transit link is P2P with one full neighbor. The passive LAN shows no neighbors but is still advertised.

R1 output
R1# show ipv6 route ospf | begin ^O
O   2001:DB8:ACAD:20::/64 [110/2]
     via FE80::2, GigabitEthernet0/0/1

R2's LAN is learned with AD 110 and cost 2 (1 for R1's gigabit link plus 1 for R2's LAN interface). The next hop is R2's link-local address, which is normal for OSPFv3.

R1 output
R1# ping 2001:db8:acad:20::1 source GigabitEthernet0/0/0
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001:DB8:ACAD:20::1, timeout is 2 seconds:
Packet sent with a source address of 2001:DB8:ACAD:10::1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/2 ms

LAN to LAN works in both directions, because R2 must also have learned R1's LAN to reply.

Mistakes people make

  • No router ID on a router without IPv4 addresses. IOS logs that OSPFv3 could not pick a router ID and no adjacency forms.
  • Forgetting ipv6 unicast-routing. OSPFv3 config is accepted but nothing is routed.
  • Hello or dead timers, area or Instance ID different on the two ends. The subnet does not have to match in OSPFv3.
  • An MTU mismatch on the link. Neighbors stall in EXSTART or EXCHANGE, as in OSPFv2.
  • Making the transit interface passive by mistake. The prefix is advertised, but no adjacency forms over it.

On other platforms

The older IOS syntax, still accepted on many releases.

Cisco IOS
ipv6 router ospf 1
 router-id 1.1.1.1
 passive-interface GigabitEthernet0/0/0
!
interface GigabitEthernet0/0/0
 ipv6 ospf 1 area 0
interface GigabitEthernet0/0/1
 ipv6 ospf network point-to-point
 ipv6 ospf 1 area 0

Junos calls it ospf3. Interfaces are listed under the area.

Junos
set routing-options router-id 1.1.1.1
set protocols ospf3 area 0.0.0.0 interface ge-0/0/1.0 interface-type p2p
set protocols ospf3 area 0.0.0.0 interface ge-0/0/0.0 passive

Say it in the interview

"IPv6 routing on, interfaces addressed, and a manual router ID because there is no IPv4 on these boxes. I enable OSPFv3 per interface in area 0, set the transit link to point-to-point and the LANs passive. I check the neighbor is FULL, the remote LAN shows up as an O route with a link-local next hop, and a sourced ping works."