Comments (6)
The main purpose of this script is to add only IP addresses --/32--, not prefixes. That's because I assume that the network organisation --prefixes, aggregations, and VRFs-- must be done manually by NOC engineers. It's quite hard to presume a prefix from a given IP address --e.g., 10.1.2.3/32 could belong either to prefix 10.1.2.0/24 or to prefix 10.1.2.0/25 or to prefix 10.1.2.0/26...
This way, IP address prefixes and aggregations are done by humans, because only they know how network should be organised. I've just reviewed you PR --thanks in advance--, but AFAIK, single IP addresses should be registered in /32 prefix, not using the mask of prefix they belong.
I'll keep both the issue and PR opened, to hear more from you.
BTW, sorry for the delay. I'm pretty busy these days, and, yes, I accept that beer. :)
from netbox-scanner.
Hi, thanks for your reply and no worries about the delay.
In my specific case, the prefixes were already created. In my PR I'm asking the API for the prefix the single IP belongs to. Basically the same thing I'd do manually.
You don't usually have a 10.1.2.0/24, 10.1.2.0/25 and 10.1.2.0/26 prefix at the same time.
I did not consider different VRFs though (not sure how to, yet. I'll try to find a way to consider VFRs).
Maybe this can be implemented optionally like with a parameter --add-prefix for example?
from netbox-scanner.
Your suggestion is good: if a certain flag is used, netbox-scanner
will guess the prefix and append it to IP addr. If we use the current version of your PR, hosts will be recorded with network addresses, which is not right.
from netbox-scanner.
I'm trying to update my PR to implement this if a flag is set but my free time for this is limited as well.
from netbox-scanner.
Please check PR #7 which I updated.
I commented on the PR
from netbox-scanner.
Thanks for your help. I created issue #18 and this will be fixed there along with other improvements.
from netbox-scanner.
Related Issues (20)
- nmap: duplicated entries detected that I cannot explain HOT 3
- Compatibility to netbox 2.9 HOT 16
- KeyError HOT 2
- Netbox-scanner fails to run with error "TypeError: __init__() got an unexpected keyword argument 'ssl_verify'"
- Misleading error message HOT 1
- Traceback error on netbox 2.10.1 HOT 1
- Is there a way to have dns_name field populated instead of description? HOT 1
- Mistake in NetBoxScanner class
- netbox-scanner.py creates IP Addresses, does not show up in Netbox HOT 1
- nmap scan not iterating through subnets HOT 1
- pip install not working HOT 1
- error when executing nmap-scan.sh HOT 1
- Could not open requirements file HOT 2
- No hosts.. wrong path? HOT 3
- No hosts being imported into Netbox while running nmap-scan HOT 3
- requirements mismatch: urllib3==1.26.5 vs requests==2.23.0 HOT 1
- nothing is imported into netbox HOT 13
- Wrong file in Instructions.
- Wrong file in Instructions.
- Netbox-scanner not writing the IPs and devices it found to the netbox UI
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from netbox-scanner.