Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

OSPFv3 Component

Enabling the OSPFv3 Component

The OSPFv3 configuration is held under the top level ospfv3 object in /etc/flockd/flockd.json. If the ospfv3 object exists OSPFv3 will be enabled and the OSPFv3 master thread will be started.

OSPFv3 (RFC 5340) is the IPv6 version of OSPF. The configuration structure mirrors OSPFv2.

With this configuration file:

  • The OSPFv3 master thread will be started

  • The OSPFv3 router will advertise a router id of 10.0.100.1

  • All interfaces with names starting with r301 will be placed in OSPF area 0.

  • The loopback interface will also be placed in area 0.

      "ospfv3": {
          "vrfs": {
              "default": {
                  "router_id": "10.0.100.1",
                  "areas": {
                      "0.0.0.0": {
                          "intfs": {
                              "lo": {},
                              "^r301": {
                                  "hello_interval": 1
                              }
                          }
                      }
                  }
              }
          }
      }
    

Redistribution of routes into OSPFv3

You may wish to redistribute routes from the RIB into OSPFv3. Use the redistribute JSON array. The origin field specifies the protocol that programmed the routes into the RIB.

"ospfv3": {
    "vrfs": {
        "default": {
            "router_id": "10.0.100.1",
            "redistribute": [
                {
                    "origin": "static",
                    "metric_type": 2,
                    "metric": 1000
                }
            ],
            "areas": {
                "0.0.0.0": {
                    "intfs": {
                        "lo": {},
                        "^r301": {}
                    }
                }
            }
        }
    }
}

Implicit and Explicit Router Id

As with OSPFv2, the router id can be set explicitly via the router_id field, or left unset to use the highest IPv4 address.

Interface Configuration

OSPFv3 interfaces support the same configuration options as OSPFv2:

"ospfv3": {
    "vrfs": {
        "<vrf-name>": {
            "areas": {
                "<area-id>": {
                    "intfs": {
                        "<interface-name>": {
                            # Interface type (default: broadcast)
                            "ospf_intf_type": ["broadcast" | "point-to-point" | "nbma" | "point-to-multipoint"],
                            # Interface output cost (default: 10)
                            "cost": ( 1..65535 ),
                            # Router Priority (default: 1)
                            "priority": ( 0..255 ),
                            # HelloInterval in seconds (default: 10)
                            "hello_interval": ( 1..65535 ),
                            # RouterDeadInterval in seconds (default: 40)
                            "dead_interval": ( 1..65535 ),
                            # Retransmit interval in seconds
                            "rxmt_interval": <seconds>,
                            # Ignore MTU mismatch with neighbor
                            "mtu_ignore": [ true | false ],
                            # BFD failure detection
                            "bfd": {
                                "multiplier": 3,
                                "min_tx": "1s"
                            }
                        }
                    }
                }
            }
        }
    }
}

Area Configuration

Area summary ranges

Area summary ranges allow aggregation of prefixes at area boundaries. When a summary range is configured, individual prefixes within that range are suppressed and replaced with a single summary prefix.

"ospfv3": {
    "vrfs": {
        "default": {
            "areas": {
                "0.0.0.1": {
                    "summary": {
                        "fc00:1::/32": {
                            "advertise": true
                        }
                    },
                    "intfs": {
                        "^eth": {}
                    }
                }
            }
        }
    }
}

Global Configuration Options

Stub router

Configure the router to advertise maximum metric in its Router LSA, causing other routers to avoid using it as a transit node.

"ospfv3": {
    "vrfs": {
        "default": {
            "stub_router": {
                "mode": "MaxMetric",
                "always": true
            }
        }
    }
}

Default route origination

"ospfv3": {
    "vrfs": {
        "default": {
            "default_originate": {
                "always": true
            }
        }
    }
}

Administrative distance

"ospfv3": {
    "vrfs": {
        "default": {
            "admin_distance": 115
        }
    }
}

LSA arrival timer

The timer_lsa_arrival sets the minimum interval (in milliseconds) between accepting the same LSA from a neighbor. This helps dampen rapid LSA flooding.

"ospfv3": {
    "vrfs": {
        "default": {
            "timer_lsa_arrival": 1000
        }
    }
}

Segment Routing and Flexible Algorithm

OSPFv3 supports Segment Routing with Prefix SIDs and Flexible Algorithms (RFC 9350).

Prefix SID Map

Prefix SIDs assign MPLS labels to IPv6 prefixes, enabling Segment Routing forwarding.

"ospfv3": {
    "vrfs": {
        "default": {
            "router_id": "10.0.100.53",
            "prefix_sid_map": {
                "fc00::0161/128": {
                    "prefix_sid": 353,
                    "flex_algo_sids": {
                        "201": {
                            "sid": 90569
                        }
                    }
                }
            }
        }
    }
}

Flexible Algorithm

Flexible Algorithms allow defining custom constraint-based paths through the network.

"ospfv3": {
    "vrfs": {
        "default": {
            "flex_algos": {
                "201": {
                    "advertise_definition": true
                },
                "202": {
                    "advertise_definition": true
                }
            }
        }
    }
}

Operational State Overview

Check OSPFv3 is enabled

Check OSPFv3 is listed in the enabled_protocols field.

flock@r301:~$ flockc sys overview
{...,"enabled_protocols":["OSPFv3"],...}

Show OSPFv3 Overview

flock@r301:~$ flockc ospfv3 inst default ospfv3 show

Show all neighbors on an interface in Area 0

flock@r301:~$ flockc ospfv3 inst default ospfv3 area 0 intf r301-eth0 neighbors
flock@r301:~$ flockc ospfv3 inst default ospfv3 area 0 lsdb

Filter LSDB by LSA type

flock@r301:~$ flockc ospfv3 inst default ospfv3 area 0 lsdb --lsa-type <type>

Filter LSDB by originating router ID

flock@r301:~$ flockc ospfv3 inst default ospfv3 area 0 lsdb --router-id <router-id>

Show network route table prefixes

flock@r301:~$ flockc ospfv3 inst default ospfv3 rib lookup <ipv6-network>
flock@r301:~$ flockc ospfv3 inst default ospfv3 rib walk <root>

Show router route table prefixes

flock@r301:~$ flockc ospfv3 inst default ospfv3 router-rib lookup <router-id>

Show event buffer

flock@r301:~$ flockc ospfv3 event-log

Show redistributed RIB

flock@r301:~$ flockc ospfv3 inst default ospfv3 redist-rib walk

Show Flexible Algorithm routes

flock@r301:~$ flockc ospfv3 inst default ospfv3 fa-rib <algo-id> walk

OSPFv3 Operation Commands Reference

Help

flockc ospfv3 -h

List OSPFv3 instances

flockc ospfv3 instances

Overview of an instance (default VRF, default instance name ospfv3)

flockc ospfv3 inst default ospfv3 show

List areas

flockc ospfv3 inst default ospfv3 areas

Area overview

flockc ospfv3 inst default ospfv3 area <area-id> show

All interfaces in an area

flockc ospfv3 inst default ospfv3 area <area-id> interfaces

All neighbors on an interface

flockc ospfv3 inst default ospfv3 area <area-id> intf <intf-name> neighbors

Link State Database

flockc ospfv3 inst default ospfv3 lsdb

Area Link State Database

flockc ospfv3 inst default ospfv3 area <area-id> lsdb

LSDB filtered by LSA type

flockc ospfv3 inst default ospfv3 area <area-id> lsdb --lsa-type <type>

LSDB filtered by originating router ID

flockc ospfv3 inst default ospfv3 area <area-id> lsdb --router-id <router-id>

Network route table prefixes

flockc ospfv3 inst default ospfv3 rib lookup <ipv6-network>
flockc ospfv3 inst default ospfv3 rib walk <root>

Router route table prefixes

flockc ospfv3 inst default ospfv3 router-rib lookup <router-id>
flockc ospfv3 inst default ospfv3 router-rib walk

Redistributed RIB

flockc ospfv3 inst default ospfv3 redist-rib walk

Event buffer

flockc ospfv3 event-log

Flexible Algorithm routes

flockc ospfv3 inst default ospfv3 fa-rib <algo-id> walk