Searching prefixes isn't full #3411

Closed
opened 2025-12-29 18:28:50 +01:00 by adam · 1 comment
Owner

Originally created by @rendxq on GitHub (Feb 26, 2020).

Environment

  • Python version: 3.7
  • NetBox version: 2.7.8

My network includes lots of "172.16.xx.yy/30" prefixes.
For example:
image
I have problems when I try searching specific prefix

Steps to Reproduce

  1. I need to look for all prefixes begins from "172.16.242" In Glogal Search field I enter something that
    image

Expected Behavior

I expect to see all of prefixies begin from "172.16.242"

Observed Behavior

I get result which consists the only Prefixes row
image

It isn't correct because my netbox has lot of prefixes 172.16.242.xx/30

Originally created by @rendxq on GitHub (Feb 26, 2020). <!-- NOTE: IF YOUR ISSUE DOES NOT FOLLOW THIS TEMPLATE, IT WILL BE CLOSED. This form is only for reproducible bugs. If you need assistance with NetBox installation, or if you have a general question, DO NOT open an issue. Instead, post to our mailing list: https://groups.google.com/forum/#!forum/netbox-discuss Please describe the environment in which you are running NetBox. Be sure that you are running an unmodified instance of the latest stable release before submitting a bug report. --> ### Environment * Python version: 3.7 * NetBox version: 2.7.8 My network includes lots of "172.16.xx.yy/30" prefixes. For example: ![image](https://user-images.githubusercontent.com/27946443/75342561-3ccd9c00-58c9-11ea-908b-bf965ce78fdd.png) I have problems when I try searching specific prefix ### Steps to Reproduce 1. I need to look for all prefixes begins from "172.16.242" In Glogal Search field I enter something that ![image](https://user-images.githubusercontent.com/27946443/75342923-f167bd80-58c9-11ea-90cf-908fee70afe8.png) <!-- What did you expect to happen? --> ### Expected Behavior I expect to see all of prefixies begin from "172.16.242" <!-- What happened instead? --> ### Observed Behavior I get result which consists the only Prefixes row ![image](https://user-images.githubusercontent.com/27946443/75343495-2f191600-58cb-11ea-9e21-bee51a5ba0de.png) It isn't correct because my netbox has lot of prefixes 172.16.242.xx/30
adam closed this issue 2025-12-29 18:28:50 +01:00
Author
Owner

@jeremystretch commented on GitHub (Feb 26, 2020):

This is intended behavior. NetBox does not support partial match of IPs, because it is limited to matching on decimal boundaries. Use the within or within_include filter to search for prefixes. For example, GET /api/ipam/prefixes/?within=172.16.242.0/24

@jeremystretch commented on GitHub (Feb 26, 2020): This is intended behavior. NetBox does not support partial match of IPs, because it is limited to matching on decimal boundaries. Use the `within` or `within_include` filter to search for prefixes. For example, `GET /api/ipam/prefixes/?within=172.16.242.0/24`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#3411