Skip to main content
POST
/
l2tp
Assign a new IP address
curl --request POST \
  --url https://api.altostrat.io/eip/l2tp \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "ip": "198.51.100.15",
  "subnet_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef"
}'
{
  "id": "f4e3d2c1-b0a9-8765-4321-fedcba098765",
  "ip": "198.51.100.15",
  "ptr": "host15.customer.com",
  "credentials": {
    "username": "eip_abc123def456",
    "password": "s3cr3tP@ssw0rd"
  },
  "connection": {
    "session_id": "sess_xyz789",
    "nas": "10.0.0.1",
    "called_station_id": "00-1A-2B-3C-4D-5E",
    "calling_station_id": "01-23-45-67-89-AB",
    "connected_at": "2025-04-07T08:30:00Z",
    "disconnected_at": null
  }
}

Authorizations

Authorization
string
header
required

Enter the Bearer token obtained after authentication.

Body

application/json

IP address and subnet details for the new assignment.

ip
string<ipv4>
required

The specific IPv4 address to assign from the subnet. Must be available and within the specified subnet.

Example:

"198.51.100.15"

subnet_id
string<uuid>
required

The UUID of the subnet from which to assign the IP address.

Example:

"a1b2c3d4-e5f6-7890-1234-567890abcdef"

Response

IP address successfully assigned and RADIUS credentials created. Returns the details of the new IP assignment, potentially including the initial password.

id
string<uuid>

Unique identifier for the IP address assignment.

Example:

"f4e3d2c1-b0a9-8765-4321-fedcba098765"

ip
string<ipv4>

The assigned IPv4 address.

Example:

"198.51.100.15"

ptr
string | null

The configured Pointer (PTR) record (Reverse DNS).

Example:

"host15.customer.com"

credentials
object

RADIUS authentication credentials associated with the IP. Password might only be available on creation/reset.

connection
object

Details about the last known RADIUS connection associated with this IP.

I