Cisco IOS XR Ping and Trace commands return some error
hmntsharma opened this issue · 3 comments
Issue
Following are the outputs for ping, traceroute and traceroute mpls, all return with errors.
--------------------------------------------------------------------------------
Thu Jun 9 20:30:15.554 UTC
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 5.5.5.5, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/6/12 ms
--------------------------------------------------------------------------------
Traceback (most recent call last):
File "./verify_lab3.py", line 36, in <module>
asyncio.run(main())
File "/usr/lib/python3.8/asyncio/runners.py", line 43, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.8/asyncio/base_events.py", line 608, in run_until_complete
return future.result()
File "./verify_lab3.py", line 33, in main
print (f"{result[0][2].result}")
File "/usr/lib/python3.8/collections/__init__.py", line 1074, in __getitem__
return self.data[i]
IndexError: list index out of range
--------------------------------------------------------------------------------
Thu Jun 9 20:29:37.671 UTC
Type escape sequence to abort.
Tracing the route to 5.5.5.5
1 12.0.0.2 [MPLS: Label 24005 Exp 0] 17 msec 8 msec 4 msec
2 27.0.0.7 [MPLS: Label 24003 Exp 0] 6 msec
23.0.0.3 5 msec
27.0.0.7 4 msec
3 47.0.0.4 [MPLS: Label 24000 Exp 0] 15 msec
34.0.0.4 5 msec 7 msec
4 45.0.0.5 9 msec * 21 msec
--------------------------------------------------------------------------------
Traceback (most recent call last):
File "./verify_lab3.py", line 36, in <module>
asyncio.run(main())
File "/usr/lib/python3.8/asyncio/runners.py", line 43, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.8/asyncio/base_events.py", line 608, in run_until_complete
return future.result()
File "./verify_lab3.py", line 33, in main
print (f"{result[0][2].result}")
File "/usr/lib/python3.8/collections/__init__.py", line 1074, in __getitem__
return self.data[i]
IndexError: list index out of range
--------------------------------------------------------------------------------
Thu Jun 9 20:26:31.628 UTC
Tracing MPLS Label Switched Path to 5.5.5.5/32, timeout is 2 seconds
Codes: '!' - success, 'Q' - request not sent, '.' - timeout,
'L' - labeled output interface, 'B' - unlabeled output interface,
'D' - DS Map mismatch, 'F' - no FEC mapping, 'f' - FEC mismatch,
'M' - malformed request, 'm' - unsupported tlvs, 'N' - no rx label,
'P' - no rx intf label prot, 'p' - premature termination of LSP,
'R' - transit router, 'I' - unknown upstream index,
'X' - unknown return code, 'x' - return code 0
Type escape sequence to abort.
0 12.0.0.1 MRU 1500 [Labels: 24005 Exp: 0]
L 1 12.0.0.2 MRU 1500 [Labels: 24003 Exp: 0] 15 ms
L 2 27.0.0.7 MRU 1500 [Labels: 24000 Exp: 0] 13 ms
L 3 47.0.0.4 MRU 1500 [Labels: implicit-null Exp: 0] 11 ms
! 4 45.0.0.5 11 ms
--------------------------------------------------------------------------------
Traceback (most recent call last):
File "./verify_lab3.py", line 36, in <module>
asyncio.run(main())
File "/usr/lib/python3.8/asyncio/runners.py", line 43, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.8/asyncio/base_events.py", line 608, in run_until_complete
return future.result()
File "./verify_lab3.py", line 33, in main
print (f"{result[0][2].result}")
File "/usr/lib/python3.8/collections/__init__.py", line 1074, in __getitem__
return self.data[i]
IndexError: list index out of range
Perhaps there is another way to fetch these output, I looked for it in the documents but hard luck.
Thanks!
IndexError: list index out of range
is not a scrapli exception. Going to close this for now. If there is an actual scrapli issue feel free to reopen with logs and steps to reproduce.
(facepalm) it was a text book mistake, did not look into the details because of the partial output on the screen, but found that I had to pint statement for the additional cmd in send_commands.
Hah no worries happens to us all! Glad it’s sorted. Don’t feel bad about opening issues in the future, just make sure to have logs/info to confirm the bug so we can sort things out!
carl