Closed XioNoX closed 6 years ago
In that case I think we should default them to None and send them to the device only when the user requests.
I am not a fan of this behaviour either and I think that's enough reason to change it - could you please open a PR to change this in the napalm-base: https://github.com/napalm-automation/napalm-base/blob/develop/napalm_base/base.py#L1177 defaulting all of them to None
and we'll synchronise on all devices.
Same for ping
.
The specific issue with traceroute is on https://github.com/napalm-automation/napalm-ios/blob/develop/napalm_ios/ios.py#L1604 If we set to None, then it doesn't know what to use to calculate max_loops. If there is a documented way of calculating a default max_loops, I can add it though.
I didn't run into that issue with ping.
What's the default maximal TTL & timeout value on IOS?
In the above the "% Invalid input" corresponds to the timeout, not the TTL (i.e. it looks like it accepted the TTL).
You need to add an IP to the traceroute to see the options in that context (in the context sensitive help):
pynet-rtr1#traceroute ?
WORD Trace route to destination address or hostname
appletalk AppleTalk Trace
clns ISO CLNS Trace
ethernet Ethernet Traceroute
ip IP Trace
ipv6 IPv6 Trace
ipx IPX Trace
<cr>
pynet-rtr1#traceroute 8.8.8.8 ?
numeric display numeric address
port specify port number
probe specify number of probes per hop
source specify source address or name
timeout specify time out
ttl specify minimum and maximum ttl
<cr>
pynet-rtr1#traceroute 8.8.8.8 ttl ?
<0-255> minimum ttl
pynet-rtr1#traceroute 8.8.8.8 ttl 0 255 ?
numeric display numeric address
port specify port number
probe specify number of probes per hop
source specify source address or name
timeout specify time out
<cr>
pynet-rtr1#traceroute 8.8.8.8 ttl 0 255 ti
pynet-rtr1#traceroute 8.8.8.8 ttl 0 255 timeout ?
<1-3600> time out in seconds
pynet-rtr1#traceroute 8.8.8.8 ttl 0 255 timeout 2
In the first comment, the marker originally points at the ttl field, but github formating makes it appear afterwards. Adding an IP doesn't show more auto-completion
#traceroute 8.8.8.8 ?
<cr>
2#traceroute 8.8.8.8 ttl ?
% Unrecognized command
Ooops, my bad...missed your earlier comment on this.
What's the default maximal TTL & timeout value on IOS?
TTL seems to be around 254 or 255 depending on the different doc I found online.
A max_loops,of 2700 (default with the current constants) works fine for me, but no idea if it would be the case for everyone.
This has been moved to https://github.com/napalm-automation/napalm/issues/450
Description of Issue/Question
napalm-ios version
(Paste verbatim output from
pip freeze | grep napalm-ios
between quotes below)IOS version
(Paste verbatim output from
show version
between quotes below)Steps to Reproduce the Issue
On at least this version of IOS, traceroute doesn't support the ttl and timeout arguments:
But napalm sets defaults at: TRACEROUTE_TTL = 255 and TRACEROUTE_TIMEOUT = 2 in constants.py. So even if the user doesn't set any ttl or timeout, it will add them to the command, resulting in an issue: