cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1006
Views
0
Helpful
15
Replies

Openconfig multiple interface autoconfig issue on IOS-XR and IOS-XR9k

henry-ezeilo
Level 1
Level 1

Hi All,

I am trying to use common openconfig interface to configure both IOS XE and IOS XR. I created a template and used Nornir_scrapli to push the config. The IOS XE was successful after deploying the config but XR 6.3.1, although it configured the IP but it configures only the first interface normally, any other interface was configured with secondary appended to it as if it is secondary IP. I attempted same config on IOS-XRv 9000 and it also configured the first normally but the subsequent Gig interfaces came back as preconfigured. I don't know if I am doing anything wrong here. Can Anyone figure out what is going on here please and help.

Below are the result of what was configured on this XR 6.3.1

interface Loopback0
ipv4 address 10.255.255.22 255.255.255.255 secondary
!
interface GigabitEthernet0/0/0/0
ipv4 address 10.22.23.22 255.255.255.0
!
interface GigabitEthernet0/0/0/1
ipv4 address 10.21.22.22 255.255.255.0 secondary
!
interface GigabitEthernet0/0/0/2
ipv4 address 10.1.22.22 255.255.255.0 secondary
!

See below for what was configured on the IOS-XRv9k.

interface Loopback0
ipv4 address 10.255.255.22 255.255.255.255
!
interface GigabitEthernet0/0/0/0
ipv4 address 10.22.23.22 255.255.255.0
!
interface preconfigure GigabitEthernet0/0/0/1
ipv4 address 10.21.22.22 255.255.255.0
!
interface preconfigure GigabitEthernet0/0/0/2
ipv4 address 10.1.22.22 255.255.255.0

 

Below are the openconfig template used for this deployment.

<config>
<interfaces xmlns="http://openconfig.net/yang/interfaces">
{% for iface in host.facts.interfaces %}
<interface>
<name>{{ iface.name }}</name>
<config>
<name>{{ iface.name }}</name>
<type xmlns:idx="urn:ietf:params:xml:ns:yang:iana-if-type">{{ iface.Type }}</type>
<enabled>{% if iface.enabled %}true{% else %}false{% endif %}</enabled>
</config>
{% if iface.ipv4 is defined %}
<subinterfaces>
<subinterface>
<index>0</index>
<ipv4 xmlns="http://openconfig.net/yang/interfaces/ip">
<addresses>
<address>
<ip>{{ iface.ipv4.address }}</ip>
<config>
<ip>{{ iface.ipv4.address }}</ip>
<prefix-length>{{ iface.ipv4.prefix }}</prefix-length>
</config>
</address>
</addresses>
</ipv4>
</subinterface>
</subinterfaces>
{% endif %}
</interface>
{% endfor %}
</interfaces>
</config>

Below are my variable host yaml file

interfaces:
- name: GigabitEthernet0/0/0/0
enabled: true
Type: "idx:ethernetCsmacd"
description: A1-XR22-A1-XE23
ipv4:
address: 10.22.23.22
prefix: 24

- name: GigabitEthernet0/0/0/1
enabled: true
Type: "idx:ethernetCsmacd"
description: A1-XR22-A1-XR21
ipv4:
address: 10.21.22.22
prefix: 24

- name: GigabitEthernet0/0/0/2
enabled: true
Type: "idx:ethernetCsmacd"
description: A1-XR22-C-XR1
ipv4:
address: 10.1.22.22
prefix: 24

- name: Loopback0
description: System_ID
enabled: true
Type: "idx:softwareLoopback"
ipv4:
address: 10.255.255.22
prefix: 32

15 Replies 15

Right so almost same issue, that the element is not recognized by the device. I think i am flat out of ideas now mate.

Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io