Use the API to manage IPv6 networks
Â
Use cases of Abiquo IPv6
There are two main use cases for IPv6 in Abiquo: Automatic generation of IPv6 address and Manual entry of IPv6 address. These two use cases are distinguished in Abiquo by the strict parameter. When strict = true, Abiquo enforces EUI-64 IP address generation.Â
 | Abiquo automatically generates IPv6 address |
---|---|
Description |
|
Strict network? | Network parameter strict = true |
Router advertisement |
|
DHCPv6 |
|
Placeholder IPs |
|
Â
 | User may manually enter IPv6 address |
---|---|
Description |
|
Strict network? | Network parameter strict = false |
Router advertisement |
|
DHCPv6 |
|
Automatic IPv6 |
|
Â
Preparation for Abiquo IPv6
Router advertisement system for all networks
When you create networks in Abiquo 2.6.2, you must configure the networks in your router advertisement system. For unmanaged networks, you would usually configure your virtual machines to receive their IP addresses from this system.
In effect, with strict networks where the allocation of EUI64 addresses is enforced, the addresses that will be assigned by the router advertisement system based on the MAC are predictable. So the address generated and displayed in Abiquo should be the same as the one allocated by the router advertisement system. This means that the DHCP is not necessary for strict networks
DHCP v6 service
Configure a DHCPv6 service for non-strict private, external and public networks. The DHCPv6 service is integrated as a remote service in your Abiquo datacenters. In Abiquo 2.6.2, you cannot set up this service while you are creating a datacenter; you must add the service to your new datacenter using the GUI or the API.
Add DHCP v6 via API
To add a DHCPv6 remote service, modify the following API request for your system and run it. Note that the remote service type is "DHCPv6".
curl --verbose -X POST -u admin:xabiquo -H "Content-type: application/vnd.abiquo.remoteservice+json" \
http://example.com/api/admin/datacenters/1/remoteservices \
-d '{
"status": 1,
"type": "DHCPv6",
"uri": "omapi://dhcpv6.example.com:7911"
}'
Configure IP address generation
When you create a network, use the strict option to configure manual or automatic address generation. If you set strict to true, then Abiquo will automatically generate EUI64 IP addresses and you will not be able to manually generate them. To be able to manually generate IP addresses, set the strict option to false, or omit the parameter. If you do not set the strict option, the default value is false.
Create a network under IPv6
Use API requests to create IPv6 networks. Remember that you must also configure the networks in your router advertisement system.
Creating an IPv6 network via the API is similar to creating an IPv4 network but there are some changes to the network DTO, as shown in the following table.
Parameter | New  | Change | Range | Description |
---|---|---|---|---|
address | Â | Â | Network address in IPv6 format. When creating a strict private network, you cannot supply the network address because Abiquo creates a ULA network. | |
primaryDNS | Â | Â | Primary DNS in IPv6 format | |
gateway | Â | Â | Not used by IPv6, all values entered will be ignored | |
mask | Â | 64, 56, 48 | IPv6 Network mask | |
ipv6 | Â | true, false | Create an IPv6 network | |
strict | Â | true, false | If false, allow manual IP entry. If no value is supplied, strict is false |
Create IPv6 external network request
Modify the following script and use it to create an IPv6 external network.
#!/bin/bash
curl --verbose -X POST 'http://example.com/api/admin/datacenters/1/network/' \
-H "Accept: application/vnd.abiquo.vlan+json" \
-H "Content-type: application/vnd.abiquo.vlan+json" \
-u abidocs:abidocs \
-d '{
"address": "fd:0:0:1::",
"dhcpOptions": {},
"gateway": "fd:0:0:1::1",
"ipv6": "true",
"links": [
{
"href": "http://localhost/api/admin/datacenters/1/networkservicetypes/1",
"rel": "networkservicetype"
},
{
"href": "http://localhost/api/admin/enterprises/7",
"rel": "enterprise"
}
],
"mask": 64,
"name": "ipv6-ext-abidocs",
"primaryDNS": "fd:0:0:1::1",
"strict": "false",
"sufixDNS": "example.com",
"tag": 2,
"type": "EXTERNAL"
}'
When the network is created successfully, the API should return the network in response. For example
{
"address": "fd:0:0:1::",
"dhcpOptions": {},
"gateway": "?",
"id": 96,
"ipv6": true,
"links": [
{
"href": "http://example.com:80/api/admin/datacenters/1",
"rel": "datacenter", "title": "API datacenter",
"type": "application/vnd.abiquo.datacenter+json"
},
{
"href": "http://example.com:80/api/admin/datacenters/1/network/96",
"rel": "edit", "title": "ipv6-ext-01",
"type": "application/vnd.abiquo.vlan+json"
},
{
"href": "http://example.com:80/api/admin/datacenters/1/networkservicetypes",
"rel": "networkservicetypes", "title": "network services types",
"type": "application/vnd.abiquo.networkservicetypes+json"
},
{
"href": "http://example.com:80/api/admin/datacenters/1/networkservicetypes/1",
"rel": "networkservicetype", "title": "Service Network",
"type": "application/vnd.abiquo.vlan+json"
},
{
"href": "http://example.com:80/api/admin/enterprises/7/limits/7/externalnetworks/96/ips",
"rel": "ips", "title": "external ips",
"type": "application/vnd.abiquo.externalips+json"
},
{
"href": "http://example.com:80/api/admin/datacenters/1/network/96/ips",
"rel": "infrastructureips", "title": "public ips",
"type": "application/vnd.abiquo.externalips+json"
},
{
"href": "http://example.com:80/api/admin/enterprises/7",
"rel": "enterprise", "title": "Abidocs",
"type": "application/vnd.abiquo.enterprise+json"
}
],
"mask": 64,
"name": "ipv6-ext-01",
"primaryDNS": "fd:0:0:1::1",
"sufixDNS": "example.com",
"tag": 2,
"type": "EXTERNAL",
"unmanaged": false
}
Create IPv6 public network request
Modify the following script and use it to create an IPv6 public network.
Create IPv6 unmanaged network request
Modify the following script and use it to create an IPv6 unmanaged network.
IPs in IPv6 networks
The following DTO is an example of an IP in an IPv6 external network. As you can see:
there is a new field for "ipv6", which is set to "true"
the IP address is in IPv6 format
Create an IP with a manually entered address
For a non-strict network, you can create an IP and manually enter the address, as opposed to using one automatically generated by Abiquo. You cannot create IPs for unmanaged networks.
The following scripts create IPs on the different networks: using the datacenter networks link for public and external networks, and virtual datacenter and private networks link.
Enter IPv6 address for non-strict private networks
Modify the following script for your platform to create an IP with a manually assigned address for non-strict private network. Run the script and enter the network ID and the IP address.
Enter IPv6 address for non-strict public and external networks
Modify the following script for your platform to create an IP with a manually assigned address for non-strict public and external networks. Run the script and enter the network ID and IP address.
Create an IP with an automatically generated address
For a strict network you must use automatically generated IP addresses in EUI-64 format. For a non-strict network, you can choose to create an IP with an automatically generated IP. If the network is private, an EUI-64 address will be generated. If the network is public or external, a random IP address will be created.
To create an IP with an automatically generated address, post an IP DTO without the IP value set.
Automatically generated address for private networks
Modify this script for your platform to create a randomly generated IP for non-strict private networks. Run the script and enter the network ID. Abiquo will create and return a valid EUI-64 IP.
Automatically generated address for public and external networks
Modify this script to create a randomly generated IP for non-strict public and external. Run the script and enter the network ID. Abiquo will create and return a random IPv6 address.
Placeholder IPs for strict external or public networks
If you generate an IP for a strict external or public network before the virtual machine is configured in the hypervisor, Abiquo will use a placeholder IP, with an ip value of "?".
You can add the placeholder IP to a virtual machine and the real EUI64 IP address will be generated when the configuration is updated in the hypervisor.
The following DTO is an example of placeholder IP.
Â
Copyright © 2006-2024, Abiquo Holdings SL. All rights reserved