Cisco IOS-XR OSPFv3 Address Family Configuration - 夜莺博客

Cisco IOS-XR OSPFv3 Address Family Configuration

OSPFv3 on IOS-XR is not simply "OSPF for IPv6". The process is created with router ospfv3, and the address family is a separate, explicitly enabled construct underneath it. Engineers who paste an IOS XE configuration into an ASR 9000 or NCS and wonder why no adjacency ever forms are almost always missing that one step. This article walks through the XR-specific hierarchy, an IPv6 unicast deployment, and the verification commands that prove the process, the area and the interface are all actually running.

Why the address family matters on XR

On XR the OSPFv3 process is a container. It holds a router ID, a set of areas and a set of interfaces, but it does not carry traffic until an address family is entered. Under router ospfv3 1 you commit a address-family ipv6 unicast block, then define areas and interfaces inside it. Until that commit lands, the interface commands you type simply have no process to attach to.

The second XR-specific habit to unlearn is interface configuration by ipv6 ospf statements. XR attaches interfaces from the routing process side, referencing the interface name and area, which keeps the interface configuration clean and makes area membership auditable in one place.

Configuring OSPFv3 on IOS-XR

RP/0/RP0/CPU0:router# configure
RP/0/RP0/CPU0:router(config)# router ospfv3 1
RP/0/RP0/CPU0:router(config-ospfv3)# router-id 10.0.0.1
RP/0/RP0/CPU0:router(config-ospfv3)# address-family ipv6 unicast
RP/0/RP0/CPU0:router(config-ospfv3-af)# area 0
RP/0/RP0/CPU0:router(config-ospfv3-ar)# interface GigabitEthernet0/0/0/0
RP/0/RP0/CPU0:router(config-ospfv3-ar-if)# cost 10
RP/0/RP0/CPU0:router(config-ospfv3-ar-if)# network point-to-point
RP/0/RP0/CPU0:router(config-ospfv3-ar-if)# exit
RP/0/RP0/CPU0:router(config-ospfv3-ar)# interface Loopback0
RP/0/RP0/CPU0:router(config-ospfv3-ar-if)# passive
RP/0/RP0/CPU0:router(config-ospfv3-ar-if)# commit

Two details are worth calling out. First, network point-to-point belongs on every point-to-point link, including the loopback, because it suppresses DR/BDR election and speeds up adjacency formation. Second, the router ID is mandatory — unlike IPv4 OSPF there is no address to borrow as a fallback, so if you forget it the process will not come up.

Common knobs once the base is up

RP/0/RP0/CPU0:router(config-ospfv3-af)# area 0 range 2001:db8:1::/48
RP/0/RP0/CPU0:router(config-ospfv3-af)# maximum-paths 8
RP/0/RP0/CPU0:router(config-ospfv3-af)# passive
RP/0/RP0/CPU0:router(config-ospfv3-af)# redistribute static
RP/0/RP0/CPU0:router(config-ospfv3-af)# log adjacency changes detail

Area range summarisation and maximum-paths live under the address family, not under the area, on XR. That placement surprises people migrating from IOS, where area 0 range sits inside the router process without an AF wrapper.

Verification: four commands that tell the whole story

show ospfv3 1
show ospfv3 1 neighbor
show ospfv3 1 interface brief
show ospfv3 1 database

show ospfv3 1 confirms the process, the router ID and the address family are active. The neighbour table should show FULL states; a permanent EXSTART almost always means an MTU mismatch, which is the same failure mode IPv4 OSPF has and the same fix — align the interface MTU rather than shrinking the interface. The interface brief view is where you catch a link that was configured but never attached to an area, and the database view is the fastest way to prove two routers agree on the same LSDB.

Troubleshooting order

  • No adjacency and no entry at all — the interface is not attached, or shutdown is still present.
  • INIT state — hellos arrive but the local router's address is not seen by the peer, usually a link-local or duplicate router ID problem.
  • EXSTART/EXCHANGE stuck — MTU mismatch, checked with show interfaces GigabitEthernet0/0/0/0 | include MTU.
  • Adjacency up but no routes — check passive was not applied to a transit interface, and that the area learned the prefix.

If you run dual-stack, the same physical link can carry IPv4 OSPFv2 and IPv6 OSPFv3 processes side by side; see the IPv4 examples in our Cisco IOS-XR OSPF configuration examples for the v2 hierarchy, and the IS-IS alternative in Cisco IOS IS-IS configuration with NET levels if you are consolidating to a single IGP for both families.

原文链接:https://www.cisco.com/c/en/us/td/docs/routers/crs/software/crs_r4-0/routing/command/reference/rr40crs1book_chapter5.html