Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(nxos): Collect IPv6 addresses from VRF interfaces in nxos_facts #940

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

roverflow
Copy link
Member

SUMMARY

Fixed an issue in cisco.nxos.nxos_facts where IPv6 addresses assigned to interfaces within VRF contexts were not being collected in net_all_ipv6_addresses. The module now correctly retrieves these addresses, ensuring comprehensive network information.

Solution

The nxos_facts module was updated to collect IPv6 addresses from interfaces residing in VRFs. The original implementation used show ipv6 interface, which only gathers information for the default VRF. The solution involves using the show ipv6 interface vrf all command to retrieve IPv6 address information from all VRFs, ensuring that net_all_ipv6_addresses contains a comprehensive list of IPv6 addresses on the device.

ISSUE TYPE
  • Bugfix Pull Request

Additional information

Output for sh ipv6 interface vrf all

IPv6 Interface Status for VRF "default"

IPv6 Interface Status for VRF "management"

IPv6 Interface Status for VRF "VRF5"

IPv6 Interface Status for VRF "test"

IPv6 Interface Status for VRF "VRF1"

IPv6 Interface Status for VRF "GI"
Ethernet1/1, Interface status: protocol-up/link-up/admin-up, iod: 5
  IPv6 address: 
    2001:db8::1234:5678::1/31 [VALID] 
  IPv6 subnet:  2001:db8::/31
  IPv6 link-local address: fe80::5014:c1ff:fe04:1b08 (default) [VALID]
  IPv6 virtual addresses configured: none
  IPv6 multicast routing: disabled
  IPv6 report link local: disabled
  IPv6 Forwarding feature: disabled
  IPv6 multicast groups locally joined:   
      ff02::2  ff02::1  ff02::1:ff00:1  ff02::1:ff04:1b08   
      ff02::1:ff00:0  
  IPv6 multicast (S,G) entries joined: none
  IPv6 MTU: 1500 (using link MTU)
  IPv6 unicast reverse path forwarding: none
  IPv6 load sharing: none 
  IPv6 interface statistics last reset: never
  IPv6 interface RP-traffic statistics: (forwarded/originated/consumed)
    Unicast packets:      0/0/0
    Unicast bytes:        0/0/0
    Multicast packets:    0/15/0
    Multicast bytes:      0/1590/0

Output of gathered facts

{
    "ansible_facts": {
        "ansible_net_all_ipv4_addresses": [
            "192.168.255.115"
        ],
        "ansible_net_all_ipv6_addresses": [
            "2001:db8:8086:5554::1/31"
        ],
        "ansible_net_api": "cliconf",
        "ansible_net_gather_network_resources": [],
        "ansible_net_gather_subset": [
            "interfaces",
            "default"
        ]
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant