Public IPs
The Public IPs page manages the public IPv4/IPv6 addresses your ISP hands out to subscribers. You define pools (a CIDR range with an optional monthly price), then create assignments that bind a single IP from a pool to a subscriber. Assigning an IP writes a Framed-IP-Address (or Framed-IPv6-Prefix) entry into radreply and disconnects the subscriber via CoA so they reconnect onto the new address.
Customers can also buy and release their own public IP from the self-service portal, charged against their wallet balance — see Customer self-service below.
How to get here
Section titled “How to get here”Sidebar → Public IPs. The page has two tabs: IP Pools and Assignments.
Viewing the page requires public_ips.view. Creating pools, assigning, reserving, and releasing all require public_ips.manage — without it the page is read-only (no Add Pool / Assign / Reserve / Release buttons, no pool edit/delete icons).
Layout
Section titled “Layout”The page is a header (with a Refresh button) plus two tabs.
IP Pools tab
Section titled “IP Pools tab”| Column | What it shows |
|---|---|
| Name | Pool name. |
| CIDR | The range as entered (e.g. 203.0.113.0/24). |
| Version | IPv4 or IPv6 badge, auto-detected from the CIDR. |
| Gateway | Optional gateway address (skipped during allocation). |
| Price/mo | Monthly price, or “Free” when 0. |
| Usage | A bar plus used/total count (used = active + reserved assignments). |
| Status | Active or Inactive. |
| Actions | Edit / Delete (only with public_ips.manage). |
Each pool’s Total IPs is computed from the prefix size minus the network and broadcast addresses. Used IPs is recalculated on every list load as the count of assignments in that pool with status active or reserved.
Assignments tab
Section titled “Assignments tab”A filter bar (Pool dropdown, Status dropdown, IP search) plus the assignment table.
| Column | What it shows |
|---|---|
| IP Address | The assigned address. Bandwidth-customer IPs are grouped into a single consolidated row showing all their IPs with an “N IPs” badge. |
| Customer | The subscriber username, or a bandwidth-customer name (shown in purple) for grouped rows. |
| Pool | Source pool name. |
| Version | IPv4 / IPv6. |
| Status | active, released, suspended, or reserved. |
| Price/mo | The price recorded on the assignment, or “Free”. |
| Assigned | When the IP was assigned. |
| Next Billing | Next billing date (populated for portal purchases). |
| Actions | Release (or Release All for a grouped bandwidth-customer row), only with public_ips.manage. |
The Status filter offers Active, Released, Suspended, and Reserved. The search box matches on IP address. The list is server-side paginated at 25 rows per page.
Create a pool
Section titled “Create a pool”- On the IP Pools tab, click Add Pool.
- Enter a Name (required) and a CIDR (required), e.g.
203.0.113.0/24for IPv4 or2001:db8::/48for IPv6. - Optionally set a Gateway, a Monthly Price (0 = free), and a Description.
- Leave Active checked so the pool can be assigned from.
- Click Save.
The CIDR is validated and the IP version is detected automatically on save. The CIDR is stored exactly as entered — the address you type before the / is treated as the start of the range. For example, with 198.51.100.50/27 allocation runs from .9 through .38, not from the normalized .0 network address.
Delete a pool
Section titled “Delete a pool”Click the trash icon on a pool row. A pool with active assignments cannot be deleted — the server rejects it with a count of how many active assignments are blocking the delete. Release those assignments first.
Assigning a public IP
Section titled “Assigning a public IP”- On the Assignments tab, click Assign IP.
- Choose a Pool (only active pools are listed, with their used/total count and price).
- Search for and select a Subscriber.
- Optionally enter a Specific IP — leave it empty to auto-allocate the next free address.
- Optionally add Notes, then click Assign IP.
What the server does on assign:
- Rejects the request if the subscriber already has an active public IP assignment (one active assignment per subscriber).
- Rejects it if the pool is inactive.
- If a specific IP was given, validates it is inside the pool’s CIDR and not already assigned. If left blank, auto-allocates the next available address.
- Creates the assignment with status active and increments the pool’s used count.
- Writes
Framed-IP-Address(IPv4) orFramed-IPv6-Prefix(IPv6) toradreplyfor the subscriber’s username (deleting any existing entry of the same attribute first). - Sends a CoA disconnect so the subscriber reconnects and picks up the new IP.
How auto-allocation picks an IP
Section titled “How auto-allocation picks an IP”Allocation walks the pool range from the entered start address, skipping the first and last address in the range, the configured gateway, any IP already active or reserved in the pool, and any IP already present in radreply as a Framed-IP-Address. The first address that passes all those checks is used. For IPv6 it scans up to the first 10,000 addresses in the prefix.
Reserving an IP
Section titled “Reserving an IP”Use Reserve IP to take an address out of the allocation pool without giving it to a subscriber — for example an IP already in use on external hardware.
- On the Assignments tab, click Reserve IP.
- Select a Pool, enter the IP Address (must be inside the pool’s CIDR), and optional Notes.
- Click Reserve IP.
The server validates the IP is in the CIDR and not already assigned or reserved, then creates a reserved assignment (no subscriber, no radreply write, no CoA) and increments the pool’s used count. Reserved IPs are excluded from future auto-allocation.
Releasing an IP
Section titled “Releasing an IP”Click Release on an assignment row (or Release All on a grouped bandwidth-customer row). Only active or reserved assignments can be released.
On release the server:
- Sets the assignment status to released and records
released_at. - Decrements the pool’s used count (floored at 0).
- If the assignment was active and tied to a subscriber, removes the
Framed-IP-Address/Framed-IPv6-Prefixfromradreplyand sends a CoA disconnect so the subscriber reconnects without the public IP.
Releasing a reserved IP just frees it for allocation — no radreply or CoA action is taken.
Customer self-service
Section titled “Customer self-service”Subscribers can manage their own public IP from the customer portal. These actions run as the logged-in subscriber:
| Action | Behavior |
|---|---|
| View | Returns the subscriber’s current active assignment (if any) plus the list of active pools, each annotated with available IP count (total − used). |
| Buy | Allocates the next available IP from the chosen active pool. Blocked if the subscriber already has an active public IP. If the pool’s monthly price is greater than 0, the price is checked against and deducted from the subscriber’s wallet balance, a subscriber-purchase transaction is recorded, and last_billed_at / next_billing_at (now + 30 days) are set. Writes radreply and CoA-disconnects to apply. |
| Release | Releases the subscriber’s active assignment: sets status released, decrements the pool, removes the radreply entry, and CoA-disconnects. |
A purchase with insufficient balance is rejected with the required vs available amount.
Permissions
Section titled “Permissions”| Permission | Effect |
|---|---|
public_ips.view | Loads the page; lists pools and assignments; reads a subscriber’s public IP and a pool’s available IPs. |
public_ips.manage | Create/edit/delete pools, assign, reserve, and release. |
The customer-portal endpoints (view / buy / release) are gated by customer authentication, not these admin permissions.
Related pages
Section titled “Related pages”- Subscribers — assignments bind to a subscriber; a subscriber’s active public IP is also surfaced per-subscriber.
- Subscriber Detail Page — where a single subscriber’s account, including their assigned IP, is managed.
- Sessions — the assigned
Framed-IP-Addressshows up here as the subscriber’s session IP after they reconnect. - Services & Plans — services also drive RADIUS pool / Framed attributes for normal (non-public) IP allocation.
- Billing & Invoices — portal purchases deduct from the subscriber wallet and record a transaction.