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

Ping does not work on NXOS when specifying source_interface #2003

Open
1 task done
decoupca opened this issue Sep 6, 2023 · 1 comment
Open
1 task done

Ping does not work on NXOS when specifying source_interface #2003

decoupca opened this issue Sep 6, 2023 · 1 comment

Comments

@decoupca
Copy link
Contributor

decoupca commented Sep 6, 2023

Description of Issue/Question

Note: Please check https://guides.github.com/features/mastering-markdown/
to see how to properly format your request.

Did you follow the steps from https://github.com/napalm-automation/napalm#faq

(Place an x between the square brackets where applicable)

  • Yes
  • [] No

Setup

napalm version

(Paste verbatim output from pip freeze | grep napalm between quotes below)

napalm==4.1.0

Network operating system version

(Paste verbatim output from show version - or equivalent - between quotes below)

Cisco Nexus Operating System (NX-OS) Software
TAC support: http://www.cisco.com/tac
Copyright (C) 2002-2023, Cisco and/or its affiliates.
All rights reserved.
The copyrights to certain works contained in this software are
owned by other third parties and used and distributed under their own
licenses, such as open source.  This software is provided "as is," and unless
otherwise stated, there is no warranty, express or implied, including but not
limited to warranties of merchantability and fitness for a particular purpose.
Certain components of this software are licensed under
the GNU General Public License (GPL) version 2.0 or
GNU General Public License (GPL) version 3.0  or the GNU
Lesser General Public License (LGPL) Version 2.1 or
Lesser General Public License (LGPL) Version 2.0.
A copy of each such license is available at
http://www.opensource.org/licenses/gpl-2.0.php and
http://opensource.org/licenses/gpl-3.0.html and
http://www.opensource.org/licenses/lgpl-2.1.php and
http://www.gnu.org/licenses/old-licenses/library.txt.

Software
  BIOS: version 05.47
  NXOS: version 10.2(5) [Maintenance Release]
  BIOS compile time:  04/28/2022
  NXOS image file is: bootflash:///nxos64-cs.10.2.5.M.bin
  NXOS compile time:  3/10/2023 12:00:00 [03/03/2023 12:00:11]

Hardware
  cisco Nexus9000 C93108TC-FX Chassis
  Intel(R) Xeon(R) CPU D-1526 @ 1.80GHz with 24556024 kB of memory.
  Processor Board ID FDO23220C7L
  Device name: SAPC00SS12
  bootflash:  115805356 kB

Kernel uptime is 81 day(s), 23 hour(s), 37 minute(s), 15 second(s)

Last reset at 148650 usecs after Fri Jun 16 14:57:41 2023
  Reason: Power Down/UP epld upgrade process
  System version: 10.2(5)
  Service: Power Down/UP epld upgrade process

plugin
  Core Plugin, Ethernet Plugin

Active Package(s):

Steps to Reproduce the Issue

Assume destination is reachable and source_interface exists on the device:

device.ping(destination='10.2.3.4', source_interface='mgmt0')

Error Traceback

(Paste the complete traceback of the exception between quotes below)

The command succeeds but returns an empty data structure ({}).

Debugging shows that the fired command is: ping 10.2.3.4 timeout 2 packet-size 100 count 5 source mgmt0

NXOS returns the following error, which is not caught by napalm:

% Invalid host/interface mgmt0

However, changing source to source-interface works:

nxos-test# ping 10.2.3.4 timeout 2 packet-size 100 count 5 source-interface mgmt0
PING 10.8.148.34 (10.8.148.34): 100 data bytes
108 bytes from 10.2.3.4: icmp_seq=0 ttl=54 time=257.729 ms
108 bytes from 10.2.3.4: icmp_seq=1 ttl=54 time=257.811 ms
108 bytes from 10.2.3.4: icmp_seq=2 ttl=54 time=257.871 ms
108 bytes from 10.2.3.4: icmp_seq=3 ttl=54 time=257.82 ms
108 bytes from 10.2.3.4: icmp_seq=4 ttl=54 time=257.917 ms

--- 10.2.3.4 ping statistics ---
5 packets transmitted, 5 packets received, 0.00% packet loss
round-trip min/avg/max = 257.729/257.829/257.917 ms
@decoupca
Copy link
Contributor Author

decoupca commented Sep 6, 2023

Also, if an invalid interface is specified as source_interface, the command will fail similarly and return an empty data structure. The result from the device is: % Invalid host/interface mgmt1

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

No branches or pull requests

2 participants