diff --git a/napalm/ios/ios.py b/napalm/ios/ios.py index 2934b6a55..85f620090 100644 --- a/napalm/ios/ios.py +++ b/napalm/ios/ios.py @@ -1957,12 +1957,17 @@ def get_bgp_neighbors(self): # get neighbor_entry out of neighbor data neighbor_entry = None for neighbor in neighbor_data: - if ( - neighbor["afi"].lower() == afi - and napalm.base.helpers.ip(neighbor["remote_addr"]) == remote_addr - ): - neighbor_entry = neighbor - break + current_neighbor = napalm.base.helpers.ip(neighbor["remote_addr"]) + if neighbor["afi"].lower() == afi and current_neighbor == remote_addr: + # Neighbor IPs in VRFs can overlap, so make sure + # we haven't covered this VRF + IP already + vrf = neighbor["vrf"] or "global" + if ( + vrf == "global" + or current_neighbor not in bgp_neighbor_data[vrf]["peers"] + ): + neighbor_entry = neighbor + break # check for proper session data for the afi if neighbor_entry is None: continue