Unable to assign IP to devices #1481

Closed
opened 2025-12-29 16:32:23 +01:00 by adam · 11 comments
Owner

Originally created by @wembrey on GitHub (Dec 29, 2017).

Issue type

[ x] Bug report

Environment

Ubuntu 16.04.3 LTS

  • Python version: 3.5.2
  • NetBox version: 2.2.8
    Apache2 Apache/2.4.18

After installing v2.2.8, I can add devices, sites, racks etc, but when I go to attach an IP to a device there is nothing in the IP drop down box. I have created several IPs in two ranges.

There is no option to an an IP to a device directly or even to an interface. There is an option to assign to a device from the IP address option but it never saves.

Originally created by @wembrey on GitHub (Dec 29, 2017). <!-- Before opening a new issue, please search through the existing issues to see if your topic has already been addressed. Note that you may need to remove the "is:open" filter from the search bar to include closed issues. Check the appropriate type for your issue below by placing an x between the brackets. For assistance with installation issues, or for any other issues other than those listed below, please raise your topic for discussion on our mailing list: https://groups.google.com/forum/#!forum/netbox-discuss Please note that issues which do not fall under any of the below categories will be closed. Due to an excessive backlog of feature requests, we are not currently accepting any proposals which extend NetBox's feature scope. Do not prepend any sort of tag to your issue's title. An administrator will review your issue and assign labels as appropriate. ---> ### Issue type [ x] Bug report <!-- Unexpected or erroneous behavior --> <!-- Please describe the environment in which you are running NetBox. (Be sure to verify that you are running the latest stable release of NetBox before submitting a bug report.) If you are submitting a bug report and have made any changes to the code base, please first validate that your bug can be recreated while running an official release. --> ### Environment Ubuntu 16.04.3 LTS * Python version: 3.5.2 * NetBox version: 2.2.8<!-- Example: 2.1.3 --> Apache2 Apache/2.4.18 <!-- BUG REPORTS must include: * A list of the steps needed for someone else to reproduce the bug * A description of the expected and observed behavior * Any relevant error messages (screenshots may also help) FEATURE REQUESTS must include: * A detailed description of the proposed functionality * A use case for the new feature * A rough description of any necessary changes to the database schema * Any relevant third-party libraries which would be needed --> After installing v2.2.8, I can add devices, sites, racks etc, but when I go to attach an IP to a device there is nothing in the IP drop down box. I have created several IPs in two ranges. There is no option to an an IP to a device directly or even to an interface. There is an option to assign to a device from the IP address option but it never saves.
adam closed this issue 2025-12-29 16:32:23 +01:00
Author
Owner

@jeremystretch commented on GitHub (Jan 2, 2018):

Thank you for taking the time to report a bug. We'll need more information to investigate this issue. Per the contributing guidelines please ensure that you have included all of the following:

  • The environment in which NetBox is running
  • The exact steps that can be taken to reproduce the issue
  • Any error messages generated
  • Screenshots (if applicable)

Please update your issue to include all of the information listed above. If no response is received within a week, this issue will be closed. Thanks!

@jeremystretch commented on GitHub (Jan 2, 2018): Thank you for taking the time to report a bug. We'll need more information to investigate this issue. Per the [contributing guidelines](https://github.com/digitalocean/netbox/blob/develop/CONTRIBUTING.md) please ensure that you have included all of the following: * The environment in which NetBox is running * The exact steps that can be taken to reproduce the issue * Any error messages generated * Screenshots (if applicable) Please update your issue to include all of the information listed above. If no response is received within a week, this issue will be closed. Thanks!
Author
Owner

@wembrey commented on GitHub (Jan 2, 2018):

Environment - initially encountered on ESXi6 running Ubuntu 16.04.3 LTS installed as a VM.
Exact steps, follow the install guide to the letter with two exceptions:

  1. Apache failed to start because WSGI was not installed so I had to do "apt-get install libapache2-mod-wsgi" to install, restart and then Apache worked fine. (docs do not mention installing this)
  2. Generate key - had to edit generate_secret_key.py with correct path to python3.

Create new Ubuntu server VM with 20Gig storage. Using current 16.04 version on website last week.
Start VM with ISO as attached CD drive and run normal Ubuntu server install
Set static IP and only install SSH server.
Start Netbox install from here: http://netbox.readthedocs.io/en/stable/installation/postgresql/ using Apache2. Set netbox.conf virtual host to listen on , [server-ip]:80"
Add secret key generated by script.
Follow install instructions including Napalm install but not configured.

To repeat this, I installed Ubuntu again from the 16.04 ISO on my machine running VMWorkstation with the type 7 machine with bridged adapter. Installed postgres but just tested with the test web server on 8000 "python3 manage.py runserver 0.0.0.0:8000 --insecure"

In both instances, netbox login works fine but I just cant add an IP address to a device. I have populated some demo values for screen shots.

Demo device
image

No option to add an IP to the interface
image

No IP available to the device in the drop down list for management IP address
image

Created IPs ready to assign to device (there's dropdown options for secondary/loopback etc. but no primary?)

image

Try to add the device by type and IP dropdown is blank:
image

I will be happy to add the deviations to installation to a doc update request after getting this sorted and suggest adding primary as an address role afterwards.

@wembrey commented on GitHub (Jan 2, 2018): Environment - initially encountered on ESXi6 running Ubuntu 16.04.3 LTS installed as a VM. Exact steps, follow the install guide to the letter with two exceptions: 1. Apache failed to start because WSGI was not installed so I had to do "apt-get install libapache2-mod-wsgi" to install, restart and then Apache worked fine. (docs do not mention installing this) 2. Generate key - had to edit generate_secret_key.py with correct path to python3. Create new Ubuntu server VM with 20Gig storage. Using current 16.04 version on website last week. Start VM with ISO as attached CD drive and run normal Ubuntu server install Set static IP and only install SSH server. Start Netbox install from here: http://netbox.readthedocs.io/en/stable/installation/postgresql/ using Apache2. Set netbox.conf virtual host to listen on , [server-ip]:80" Add secret key generated by script. Follow install instructions including Napalm install but not configured. To repeat this, I installed Ubuntu again from the 16.04 ISO on my machine running VMWorkstation with the type 7 machine with bridged adapter. Installed postgres but just tested with the test web server on 8000 "python3 manage.py runserver 0.0.0.0:8000 --insecure" In both instances, netbox login works fine but I just cant add an IP address to a device. I have populated some demo values for screen shots. Demo device ![image](https://user-images.githubusercontent.com/30414164/34492090-036ee44c-efde-11e7-8fb7-8f346344aec5.png) No option to add an IP to the interface ![image](https://user-images.githubusercontent.com/30414164/34492131-288a1738-efde-11e7-86a8-770cf826c2ad.png) No IP available to the device in the drop down list for management IP address ![image](https://user-images.githubusercontent.com/30414164/34492160-47d797dc-efde-11e7-83c5-21c54b47e400.png) Created IPs ready to assign to device (there's dropdown options for secondary/loopback etc. but no primary?) ![image](https://user-images.githubusercontent.com/30414164/34492215-86fd3ae8-efde-11e7-9d43-c50d0acc9907.png) Try to add the device by type and IP dropdown is blank: ![image](https://user-images.githubusercontent.com/30414164/34492238-a7621970-efde-11e7-9ba8-079465665dd4.png) I will be happy to add the deviations to installation to a doc update request after getting this sorted and suggest adding primary as an address role afterwards.
Author
Owner

@dirtycajunrice commented on GitHub (Jan 2, 2018):

Wembry,

to use those dropdowns, the IP addresses already have to be assigned to an Interface on the device. Otherwise it has no idea where to look. Keeping in mind that if you checkbox the "Primary IP" checkbox when assigning the IP address to the interface, you will never have to use this dropdown. In addition, you will find this fixes the NAT IP as a cascading fix! XD

Let us know if you see any more issues

@dirtycajunrice commented on GitHub (Jan 2, 2018): Wembry, to use those dropdowns, the IP addresses already have to be assigned to an Interface on the device. Otherwise it has no idea where to look. Keeping in mind that if you checkbox the "Primary IP" checkbox when assigning the IP address to the interface, you will never have to use this dropdown. In addition, you will find this fixes the NAT IP as a cascading fix! XD Let us know if you see any more issues
Author
Owner

@wembrey commented on GitHub (Jan 2, 2018):

I dont see any option to assign an IP to an interface - what am I missing?

@wembrey commented on GitHub (Jan 2, 2018): I dont see any option to assign an IP to an interface - what am I missing?
Author
Owner

@dirtycajunrice commented on GitHub (Jan 2, 2018):

You have to create an interface on the device, then press the green plus button on the interface to assign an IP address

@dirtycajunrice commented on GitHub (Jan 2, 2018): You have to create an interface on the device, then press the green plus button on the interface to assign an IP address
Author
Owner

@wembrey commented on GitHub (Jan 2, 2018):

Ok so would you expect to see that button on the second screen shot? I can do others if you need?

@wembrey commented on GitHub (Jan 2, 2018): Ok so would you expect to see that button on the second screen shot? I can do others if you need?
Author
Owner

@dirtycajunrice commented on GitHub (Jan 2, 2018):

When a device is already created the page has an empty interfaces section:
image
When you click add interfaces and create an interface and make one:
image
it then will look like this:
image
if you hit the add ip address button:
image
it will let you either create or assign an existing ip.
then you can set that IP as primary

@dirtycajunrice commented on GitHub (Jan 2, 2018): When a device is already created the page has an empty interfaces section: ![image](https://user-images.githubusercontent.com/15788890/34500753-ae50ac90-efd1-11e7-8f52-b92832d287d0.png) When you click add interfaces and create an interface and make one: ![image](https://user-images.githubusercontent.com/15788890/34500788-d6849ae6-efd1-11e7-8203-db0dc1efe3e9.png) it then will look like this: ![image](https://user-images.githubusercontent.com/15788890/34500821-ee511eec-efd1-11e7-8413-78b6bfdd41a1.png) if you hit the add ip address button: ![image](https://user-images.githubusercontent.com/15788890/34500832-fc0d1b62-efd1-11e7-9425-0c620ae08d15.png) it will let you either create or assign an existing ip. then you can set that IP as primary
Author
Owner

@dirtycajunrice commented on GitHub (Jan 2, 2018):

Please keep in mind this is all in the documentation:
http://netbox.readthedocs.io/en/latest/data-model/dcim/#devices
http://netbox.readthedocs.io/en/latest/data-model/ipam/#ip-addresses

@dirtycajunrice commented on GitHub (Jan 2, 2018): Please keep in mind this is all in the documentation: http://netbox.readthedocs.io/en/latest/data-model/dcim/#devices http://netbox.readthedocs.io/en/latest/data-model/ipam/#ip-addresses
Author
Owner

@wembrey commented on GitHub (Jan 3, 2018):

Thanks Nicholas, that last images answers the question. While the docs explained you "can" add the IP, they don't mention the method which is what I was missing. Thanks for clearing this up.

@wembrey commented on GitHub (Jan 3, 2018): Thanks Nicholas, that last images answers the question. While the docs explained you "can" add the IP, they don't mention the method which is what I was missing. Thanks for clearing this up.
Author
Owner

@lmlavinjr1 commented on GitHub (Jun 20, 2018):

I took the steps you managed above for a virtual machine... was never offered a list of IP addresses..
I have filled the IP tables, the virtual machine tables.. even assigned Clusters to the virtual machines.. but cannot get the IP addresses to tie to the virtual machines... This is ovm manager.. DO I need to create OVS physical servers as well before I create the VMs?

@lmlavinjr1 commented on GitHub (Jun 20, 2018): I took the steps you managed above for a virtual machine... was never offered a list of IP addresses.. I have filled the IP tables, the virtual machine tables.. even assigned Clusters to the virtual machines.. but cannot get the IP addresses to tie to the virtual machines... This is ovm manager.. DO I need to create OVS physical servers as well before I create the VMs?
Author
Owner

@jcbrandis commented on GitHub (Jun 7, 2019):

Gday, @DirtyCajunRice > Many thanks for this. I was going crazy with the same issue. Now up and dancing again.

@jcbrandis commented on GitHub (Jun 7, 2019): Gday, @DirtyCajunRice > Many thanks for this. I was going crazy with the same issue. Now up and dancing again.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#1481