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

Prefix related IPs wrong in /31 subnets #476

Closed
nniehoff opened this issue May 21, 2021 · 4 comments · Fixed by #509
Closed

Prefix related IPs wrong in /31 subnets #476

nniehoff opened this issue May 21, 2021 · 4 comments · Fixed by #509
Assignees
Labels
type: bug Something isn't working as expected

Comments

@nniehoff
Copy link
Contributor

Environment

  • Python version: 3.6
  • Nautobot version: 1.0.1

When creating a small prefix say /31 and adding 2 IPs to that prefix the first IP is associated with the prefix but the second is not. This might happen with larger prefixes but it is easily noticeable with smaller subnets.

Steps to Reproduce

  1. Create a prefix 192.168.0.62/31
  2. Create an IP 192.168.0.62/31
  3. Create an IP 192.168.0.63/31

Expected Behavior

The prefix should show 2 IPs. If you find the first IP 192.168.0.62/31 it should show 192.168.0.63/31 as a related IP.

Observed Behavior

The prefix shows 1 IP. 192.168.0.62/31 shows no related IPs but 192.168.0.63/31 does show 192.168.0.62/31 as a related IP.

@nniehoff
Copy link
Contributor Author

@retnuh I believe I have captured the behavior you observed, if not feel free to correct me.

@jathanism jathanism added the type: bug Something isn't working as expected label May 21, 2021
@nniehoff
Copy link
Contributor Author

FYI /30 seems to work just fine

@retnuh
Copy link

retnuh commented May 21, 2021

Yes that's correct; also the two IP's were created at the same time using the ipam_prefixes_available-ips_create endpoint.

@dgarros
Copy link
Contributor

dgarros commented May 21, 2021

FYI, The issue is present in the sandbox for a quick check

Prefix 10.0.192.0/31> https://demo.nautobot.com/ipam/prefixes/0e9b485f-5351-4502-8321-16c921cdee70/ip-addresses/
Should include both 10.0.192.0 and 10.0.192.1 but it's showing only the first one
https://demo.nautobot.com/ipam/ip-addresses/05b264b6-222e-42e9-bbbd-343be943f164/
https://demo.nautobot.com/ipam/ip-addresses/ef60f4a7-ab89-42e1-bae9-d81ed785e0b7/

Screen Shot 2021-05-21 at 12 44 44 PM

@glennmatthews glennmatthews self-assigned this May 28, 2021
glennmatthews added a commit that referenced this issue Jun 3, 2021
…, /127) (#509)

* Correctly handle 'broadcast' for point-to-point network prefixes (/31, /127). Fixes #476

* Add migration
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug Something isn't working as expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants