Setting Up OSPFv3 with Ansible

Hello, I’ve been able to configure OSPFv2 and change the AD to 125 using Ansible with no issues. However, I am having an issue changing the AD with OSPFv3. I can get it to install but it won’t let me change the administrative distance to 125?

  • name: Change AD
    ios_config:
    lines:
    - distance 125
    parents: address-family ipv4 unicast

Any thoughts?

Hello John

Hmm, that sounds strange. At first I thought it may be because IPv4 using OSPFv3 may have a different syntax, but that’s not the case. The AD is configured the same way for OSPFv3 when using IPv4 addresses as far as the actual configuration syntax goes. Take a look at the following Cisco documentation that demonstrates this:

Have you been able to take a look and see if any error messages are sent by the router, or any syslogs that monitor OSPF configs? It would be helpful to see a response from the router to understand why these AD values are not being changed.

Take a look and let us know of any further information you can share.

I hope this has been helpful!

Laz

Thanks for the response. I know how to setup OSPFv3 via the cli. I’m just trying to use ansible to setup it up using network automation and on purpose changing the AD. Here, is a link https://docs.ansible.com/ansible/latest/collections/cisco/ios/ios_ospfv3_module.html

Hello John

Understood. I just suggested that initially, I thought it could be the difference in the syntax used for OSPFv3, however, this is not the case. The ansible documentation you shared shows that the syntax you’re using is correct in your code. However, when the change in AD fails, what error messages do you get if any?

Let us know so we can help you further.

I hope this has been helpful!

Laz