IPv6 Routing : OSPF Example

I’m using a basic configuration with single loopback on each or R1 and R2.  R1 is configured using global prefix and R2 is using auto-config with no default…

IPv6 OSPF

  • OSPFv3 for IPv6 but added IPv4 address families in 2010.
  • Traditional OSPFv3 (only IPv6) or OSPFv3 with AF (IPv4 families too).
  • FF02::5 (All SPF Routers) and FF02::6 (All DR Routers)
  • IPsec only with OSPFv3
  • IPsec/HMAC/SHA1 to 512 for AF version.
  • Metric is the cumulative cost of sending out the interface (10^8/BW (bps))
  • Reference bandwidth is 100Mbps (10^8), and altered in router config mode
  • Areas principle the same
  • Router ID (configured > Highest Lo > Highest i/f)
  • Messages sourced with LL addresses
  • LSAs, Standard plus
    • Type 8 – Link LSA – Send if >1 router on link – Flooded to link only – LLAs.
    • Type 9 – Intra-Area-Prefix LSA – Scope : Single Area
      • Associate IPv6 prefix to transit network; points prefix to network LSA (2)
      • Associate IPv6 prefix with router; points prefix to Router LSA (1)

Why do we need the new type 8 and 9?

With v2, effectively the control and the data plans are the same and represented by the type 1 and 2.  If something changes SPF ran again because it assumed a topology change.   V3 took the addressing/prefix’s out of type 1 and 2 and moved them to type 8/9 depending on which address.

Since Link Local Addresses are not routable, they are a separate type (8).  The prefixes are advertised in type 9’s.  Overall, SPF should run less often and be more efficient.

NBMA

NNNNonbroadcast Needs Neighbours using LLA

OSPFv3 Configuration Example

  • If no IPv4 address, then configure router-id
  • enable IPv6 process under interface
  • log-adj changes to check
  • Perform encryption if required:
    • AH – using “ipv6 ospf authentication” command under interface
    • ESP – using “ipv6 ospf encryption” command under interface
R1(config)#ipv6 router ospf 1
R1(config-rtr)#router-id 1.1.1.1
R1(config-rtr)#log-adjacency-changes
R1(config-rtr)#int lo 0
R1(config-if)#ipv6 ospf 1 area 1
R1(config-if)#int fa 0/0
R1(config-if)#ipv6 ospf 1 area 0


R2(config)#ipv6 router ospf 1
R2(config-rtr)#router-id 2.2.2.2
R2(config-rtr)#log-adjacency-changes
R2(config-if)#int lo 0
R2(config-if)#ipv ospf 1 area 2
R2(config-if)#int fa 0/0
R2(config-if)#ipv ospf 1 area 0
R2(config-if)#end
R2#
*Jul 29 11:36:01.079: %OSPFv3-5-ADJCHG: Process 1, Nbr 1.1.1.1 on FastEthernet0/0 from LOADING to FULL, Loading Done
*Jul 29 11:36:01.799: %SYS-5-CONFIG_I: Configured from console by console

Verify

R2#show ip ospf neighbor
%OSPF: Router process 1 is not running, please configure a router-id
R2#show ipv6 ospf neighbor

OSPFv3 Router with ID (2.2.2.2) (Process ID 1)

Neighbor ID Pri State Dead Time Interface ID Interface
1.1.1.1 1 FULL/DR 00:00:39 3 FastEthernet0/0

 

R2#show ipv6 ospf database

OSPFv3 Router with ID (2.2.2.2) (Process ID 1)

Router Link States (Area 0)

ADV Router Age Seq# Fragment ID Link count Bits
1.1.1.1 168 0x80000002 0 1 B
2.2.2.2 167 0x80000001 0 1 B

Net Link States (Area 0)

ADV Router Age Seq# Link ID Rtr count
1.1.1.1 168 0x80000001 3 2

Inter Area Prefix Link States (Area 0)

ADV Router Age Seq# Prefix
1.1.1.1 243 0x80000001 2001:1111:1111::1/128
2.2.2.2 167 0x80000001 2001:2222::1/128

Link (Type-8) Link States (Area 0)

ADV Router Age Seq# Link ID Interface
1.1.1.1 243 0x80000001 3 Fa0/0
2.2.2.2 167 0x80000001 3 Fa0/0

Intra Area Prefix Link States (Area 0)

ADV Router Age Seq# Link ID Ref-lstype Ref-LSID
1.1.1.1 168 0x80000001 3072 0x2002 3

Router Link States (Area 2)

ADV Router Age Seq# Fragment ID Link count Bits
2.2.2.2 167 0x80000002 0 0 B

Inter Area Prefix Link States (Area 2)

ADV Router Age Seq# Prefix
2.2.2.2 157 0x80000001 2001:9999:9999:CAFE::/64
2.2.2.2 157 0x80000001 2001:1111:1111::1/128

Intra Area Prefix Link States (Area 2)

ADV Router Age Seq# Link ID Ref-lstype Ref-LSID
2.2.2.2 176 0x80000001 0 0x2001 0
R2#

OSPFv3  Address Family Configuration Example

  • If no IPv4 address, then configure router-id
  • AFI – Address Family Instances (think vrf style separation for a routing protocol so two AFIs can run on same link)
    • 0 (base) to 31 = IPv6 Unicast
    • 32(b) to 63 = IPv6 Multicast
    • 64 (b) to 95 = IPv4 Unicast
    • 96 (b) to 127 = IPv4 Multicast
    • 128 – 191 = Reserved
    • 192 – 255 = Reserved – Private Use
  • Can configure under IF or AF within process.
R1(config-if)#int lo 0
R1(config-if)#ospfv3 1 ipv6 area 1
R1(config-if)#int fa 0/0
R1(config-if)#ospfv3 1 ipv6 area 0
R1(config-if)#
*Jul 29 12:10:12.543: %OSPFv3-4-NORTRID: Process OSPFv3-1-IPv6 could not pick a router-id, please configure manually
R1(config-if)#router ospfv3 1
R1(config-router)#router-id 1.1.1.1

R2(config)#router ospfv3 1
R2(config-router)#router-id 2.2.2.2
R2(config-router)#address-family ipv6 unicast
R2(config-router-af)#area 2 stub

R2(config-router)#int lo 0
R2(config-if)#ospfv3 1 ipv6 area 2
R2(config-if)#int fa 0/0
R2(config-if)#ospfv3 1 ipv6 area 0
R2(config-if)#end

*Jul 29 12:11:07.811: %OSPFv3-5-ADJCHG: Process 1, IPv6, Nbr 1.1.1.1 on FastEthernet0/0 from LOADING to FULL, Loading Done
R2#show ipv6 ospf  1 0 database

            OSPFv3 Router with ID (2.2.2.2) (Process ID 1)

                Router Link States (Area 0)

ADV Router       Age         Seq#        Fragment ID  Link count  Bits
 1.1.1.1         297         0x80000002  0            1           B
 2.2.2.2         296         0x80000002  0            1           B

                Net Link States (Area 0)

ADV Router       Age         Seq#        Link ID    Rtr count
 2.2.2.2         296         0x80000001  3          2

                Inter Area Prefix Link States (Area 0)

ADV Router       Age         Seq#        Prefix
 1.1.1.1         74          0x80000003  2001:1111:1111::1/128
 2.2.2.2         355         0x80000001  2001:2222::1/128

                Link (Type-8) Link States (Area 0)

ADV Router       Age         Seq#        Link ID    Interface
 1.1.1.1         342         0x80000001  3          Fa0/0
 2.2.2.2         355         0x80000001  3          Fa0/0

                Intra Area Prefix Link States (Area 0)

ADV Router       Age         Seq#        Link ID    Ref-lstype  Ref-LSID
 2.2.2.2         296         0x80000001  3072       0x2002      3

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s