Support for 32-bit ASNs #196

Closed
opened 2025-12-29 16:19:15 +01:00 by adam · 1 comment
Owner

Originally created by @daknob on GitHub (Jul 12, 2016).

Currently adding a 32-bit ASN throws an error message in the "Add Site" page:

Ensure this value is less than or equal to 2147483647.

However you are using a signed integer in this check. The BGP ASN can be a 32-bit unsigned integer, which means it can accept values from 0 to 4294967296. This error can render some ASNs unmanageable. Although RIRs have not allocated an ASN this large yet, the 32-bit ASN Private Range (4200000000 - 4294967294) is not supported.

Originally created by @daknob on GitHub (Jul 12, 2016). Currently adding a 32-bit ASN throws an error message in the "Add Site" page: ``` Ensure this value is less than or equal to 2147483647. ``` However you are using a signed integer in this check. The BGP ASN can be a 32-bit **un**signed integer, which means it can accept values from `0` to `4294967296`. This error can render some ASNs unmanageable. Although RIRs have not allocated an ASN this large yet, the 32-bit ASN Private Range (`4200000000` - `4294967294`) is not supported.
adam added the type: bug label 2025-12-29 16:19:15 +01:00
adam closed this issue 2025-12-29 16:19:15 +01:00
Author
Owner

@jeremystretch commented on GitHub (Jul 12, 2016):

The asn field is currently defined as a PositiveIntegerField which as @DaKnOb points out behaves as a signed integer. We might need a custom field to support unsigned 32-bit integers.

@jeremystretch commented on GitHub (Jul 12, 2016): The `asn` field is currently defined as a [PositiveIntegerField](https://docs.djangoproject.com/en/1.9/ref/models/fields/#positiveintegerfield) which as @DaKnOb points out behaves as a signed integer. We might need a custom field to support unsigned 32-bit integers.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#196