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

Cisco IOS issue: static routes pointing to Null0 interface not ingested, script errors out. #51

Closed
svestenik opened this issue Aug 8, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@svestenik
Copy link

While trying to ingest vrf routing table, ingest script errors out when encountering a static route pointing to Null0 device.

An exception occurred: ValueError: Even one of nexthop_ip or nexthop_if_id should have a value.

Traceback (most recent call last):
  File "/opt/netbox/netbox/extras/scripts.py", line 476, in _run_script
    script.output = script.run(data=data, commit=commit)
  File "/opt/netbox/netbox/scripts/NetDoc.py", line 290, in run
    log_ingest(log)
  File "/opt/netbox/venv/lib/python3.9/site-packages/netdoc/utils.py", line 381, in log_ingest
    module.ingest(log)
  File "/opt/netbox/venv/lib/python3.9/site-packages/netdoc/ingestors/netmiko_cisco_ios_show_ip_route.py", line 72, in ingest
    routetableentry.create(**data)
  File "/opt/netbox/venv/lib/python3.9/site-packages/netdoc/schemas/routetableentry.py", line 70, in create
    raise ValueError("Even one of nexthop_ip or nexthop_if_id should have a value.")
ValueError: Even one of nexthop_ip or nexthop_if_id should have a value.

Route entry looks like this:

S        111.222.3.0/27 is directly connected

12764.json.txt

Raw log file attached.

@dainok
Copy link
Owner

dainok commented Aug 8, 2023

This is curious because I expect at least interface or next hop to be set:

https://github.com/networktocode/ntc-templates/blob/master/tests/cisco_ios/show_ip_route/cisco_ios_show_ip_route.raw

Which router model / OS version are you using?

@dainok dainok added the bug Something isn't working label Aug 8, 2023
@svestenik
Copy link
Author

svestenik commented Aug 8, 2023

Next hop is Null0 interface, set up like this:

ip route vrf aws-interco 111.222.3.0 255.255.255.224 Null0 250

Its Cisco ASR1002 with ios-xe version 9.03.16.

@dainok
Copy link
Owner

dainok commented Aug 8, 2023

Agree, but I expect as following:

S        11.1.0.0/17 [1/0], 2w0d, Null0

I'll make a patch dropping the line.

@dainok
Copy link
Owner

dainok commented Aug 10, 2023

Fixed on #53

@dainok dainok closed this as completed Aug 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants