XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Netbox Plugin: IP-address created always uses the "largest prefix" in Netbox

    Scheduled Pinned Locked Moved Xen Orchestra
    5 Posts 4 Posters 1.1k Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • vilhelmV Offline
      vilhelm
      last edited by

      Let's say I have the prefix 192.168.0.0/16 added in Netbox, and a sub-prefix 192.168.100.0/24. Now, if I have a VM running using IP 192.168.100.69, the Netbox plugin will create this IP as 192.168.100.69/16 instead of 192.168.100.69/24.

      Is this intended behavior and if not, should I open an issue about it on GitHub? Thanks!

      pdoniasP 1 Reply Last reply Reply Quote 0
      • olivierlambertO Offline
        olivierlambert Vates 🪐 Co-Founder CEO
        last edited by

        Question for @fohdeesha and/or @pdonias

        fohdeeshaF 1 Reply Last reply Reply Quote 0
        • fohdeeshaF Offline
          fohdeesha Vates 🪐 Pro Support Team @olivierlambert
          last edited by

          @olivierlambert I vaguely remember @pdonias and I discussing which of these behaviors would be best and we decided on adding it to the smallest matching prefix, I'm not sure why the behavior is the opposite

          1 Reply Last reply Reply Quote 1
          • pdoniasP Offline
            pdonias Vates 🪐 XO Team @vilhelm
            last edited by

            @vilhelm This isn't the intended behavior, it should indeed pick the /24 prefix. I tested it with your values and it properly chooses the /24 prefix. Is the Netbox plugin up-to-date and re-built? It should work since commit 0966efb7f29758a3a179237e97e641f6288b6040 (XO 5.63.1, xo-server-netbox 0.3.1).

            vilhelmV 1 Reply Last reply Reply Quote 1
            • vilhelmV Offline
              vilhelm @pdonias
              last edited by

              @pdonias Yes, I was running a newer version than that but just to make sure I upgraded to 8068b83ffe58e6caed0cac5816ac2690479a9c41. Still the same problem, unfortunately.

              I'm not too sure if it matters, but there are VMs running in the pool that does not have an IP in a "smaller" /24 prefix. So if the prefixes 192.168.0.0/16 and 192.168.100.0/24 are in Netbox, there might be VMs using IPs other than the ones in the 192.168.100.0/24 prefix.

              1 Reply Last reply Reply Quote 0

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              • First post
                Last post