Can't add a /32 prefix #341

Closed
opened 2025-12-29 16:21:04 +01:00 by adam · 4 comments
Owner

Originally created by @rgstori on GitHub (Aug 9, 2016).

When adding a new /32 subnet, both with prefix "x.y.z.w" and "x.y.z.w/32", I get the error

<type 'exceptions.AttributeError'>
'unicode' object has no attribute 'version'

Prefixes with the same network address, but masks ranging from /31 to /24, work as expected.

Originally created by @rgstori on GitHub (Aug 9, 2016). When adding a new /32 subnet, both with prefix "x.y.z.w" and "x.y.z.w/32", I get the error <type 'exceptions.AttributeError'> 'unicode' object has no attribute 'version' Prefixes with the same network address, but masks ranging from /31 to /24, work as expected.
adam added the type: bug label 2025-12-29 16:21:04 +01:00
adam closed this issue 2025-12-29 16:21:04 +01:00
Author
Owner

@rgstori commented on GitHub (Aug 9, 2016):

I'm actually not sure if I should define a prefix for /32 addresses, what I'm trying to do is to describe the content of a /22 prefix, that is

  • A number of /27,/28,/29 subnets, each associated to a vlan
  • After these subnets, I allocated some /32 IPs for the load balancer VIPs.

If I don't create prefixes for the /32 VIPs, and create addresses instead, the prefix view shows those IPs as available, which is not true.
Should I create /32 prefixes? Or should I create a "fake" container prefix for the VIPs and subsequent free space?

@rgstori commented on GitHub (Aug 9, 2016): I'm actually not sure if I should define a prefix for /32 addresses, what I'm trying to do is to describe the content of a /22 prefix, that is - A number of /27,/28,/29 subnets, each associated to a vlan - After these subnets, I allocated some /32 IPs for the load balancer VIPs. If I don't create prefixes for the /32 VIPs, and create addresses instead, the prefix view shows those IPs as available, which is not true. Should I create /32 prefixes? Or should I create a "fake" container prefix for the VIPs and subsequent free space?
Author
Owner

@jeremystretch commented on GitHub (Aug 9, 2016):

These are IP addresses, not prefixes. NetBox will not allow you to create a prefix with a /32 (IPv4) or /128 (IPv6) mask. This is supposed to be reported as an error in the form, but there's a problem with the way the model is being validated (fixing now).

@jeremystretch commented on GitHub (Aug 9, 2016): These are IP addresses, not prefixes. NetBox will not allow you to create a prefix with a /32 (IPv4) or /128 (IPv6) mask. This is supposed to be reported as an error in the form, but there's a problem with the way the model is being validated (fixing now).
Author
Owner

@rgstori commented on GitHub (Aug 9, 2016):

Thank you!
How can I avoid seeing an "available" child prefix if a /32 IP address (defined in the parent prefix) is occupying that space?

@rgstori commented on GitHub (Aug 9, 2016): Thank you! How can I avoid seeing an "available" child prefix if a /32 IP address (defined in the parent prefix) is occupying that space?
Author
Owner

@jeremystretch commented on GitHub (Aug 9, 2016):

You can define a prefix with a role of "container" to denote the space carved out for those loopback IPs. So for example, if you have eight VIPs within a /24, you can create a /29 within the /24 to summarize those.

@jeremystretch commented on GitHub (Aug 9, 2016): You can define a prefix with a role of "container" to denote the space carved out for those loopback IPs. So for example, if you have eight VIPs within a /24, you can create a /29 within the /24 to summarize those.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#341