• SAP HANA

saphana
  1. Help Center
  2. SAP HANA
  3. User Guide (API)
  4. Creating a HANA ECS
  5. Applying for a Subnet

Applying for a Subnet

For detailed API information, see Native OpenStack API Reference.

Parameters

subnet

Attribute

Type

CRUD

Default Value

Restriction

Description

id

Uuid-str

R

Automatically generated

N/A

Specifies a subnet ID.

name

String (255)

CRU

Empty

N/A

Specifies a subnet name.

ip_version

Int

CR

N/A

4 or 6

Specifies an IP version.

Only IPv4 is supported.

ipv6_address_mode

String

CR

N/A

dhcpv6-stateful, dhcpv6-stateless, or slaac

Specifies the IPv6 addressing mode.

This function is not supported.

ipv6_ra_mode

String

CR

N/A

dhcpv6-stateful, dhcpv6-stateless, or slaac

Specifies the IPv6 route broadcast mode.

This function is not supported.

network_id

Uuid-str

CR

N/A

Existing network IDs

Specifies a network ID.

cidr

String (64)

CR

N/A

Valid CIDR formats

Specifies a CIDR format.

Only the addresses in the 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 network segments are supported. In addition, the mask cannot be longer than 24 bits.

gateway_ip

String (64)

CRUD

First IP address in CIDR

Valid IP addresses or null

Specifies a gateway IP address.

allocation_pools

List (allocation_pool)

CR

All CIDR IP addresses excepting the gateway and broadcast addresses

The start and end IP addresses must be valid.

Specifies available IP address pools. For details, see the allocation_pool table.

For example, [ { "start": "10.0.0.2", "end": "10.0.0.254"} ].

When you update an IP address pool, the allocation_pool value can contain neither gateway nor broadcast IP addresses.

dns_nameservers

List (String)

CRU

Empty list

Maximum value: 5

Specifies a domain name server (DNS).

For example, "dns_nameservers": ["8.8.8.8","8.8.4.4"].

host_routes

List (host_route)

CRU

Empty list

Maximum value: 20

Specifies static VM routes. For details, see the host_route table.

This function is not supported.

tenant_id

String (255)

CR

N/A

N/A

Specifies a tenant ID. Only the administrator can specify the tenant_id of other tenants.

enable_dhcp

Bool

CRU

True

True or false

Indicates whether to enable DHCP. Value False indicates not to enable DHCP.

The value can only be True.

allocation_pool

Parameter

Type

Restriction

Mandatory or Not

Description

start

String (64)

Valid IP address

No

Specifies the start IP address of a network pool.

end

String (64)

Valid IP address

No

Specifies the end IP address of a network pool.

host_route

Parameter

Type

Restriction

Mandatory or Not

Description

destination

String (64)

Valid CIDR formats

No

Specifies a route destination subnet.

nexthop

String (64)

Valid IP address

No

Specifies the next-hop IP address of a route.

API Format

Method

URI

Description

POST

/v2.0/subnets

Creates a subnet.

Restrictions

None

Request Parameters

Parameter

Type

Mandatory or Not

Description

subnet

dict

Yes

Specifies a subnet. For details, see the subnet table.

Mandatory fields: network_id, ip_version, and cidr (For instructions about how to create a network, see section Creating a Network.)

Response Parameters

Parameter

Type

Mandatory or Not

Description

subnet

dict

Yes

Specifies a subnet. For details, see the subnet table.

Request Example

POST /v2.0/subnets
{
   "subnet": {
     "name": "testsubnet",
     "enable_dhcp": true,
     "network_id": "60c809cb-6731-45d0-ace8-3bf5626421a9",
     "tenant_id": "6fbe9263116a4b68818cf1edce16bc4f",
     "dns_nameservers": [
       "10.0.0.1",//Change the IP address to the actual one.
       "10.0.0.2",//Change the IP address to the actual one.
 ],
  "allocation_pools": [
   {
     "start": "10.0.10.2",
     "end": "10.0.10.254"
   }
 ],
 "host_routes": [],
 "ip_version": 4,
 "gateway_ip": "10.0.10.1",
 "cidr": "10.0.10.0/24"
 }
}

Response Example

{
     "subnet": {
       "name": "testsubnet",
       "enable_dhcp": true,
       "network_id": "60c809cb-6731-45d0-ace8-3bf5626421a9",
       "tenant_id": "6fbe9263116a4b68818cf1edce16bc4f",
       "dns_nameservers": [
         "10.0.0.1",//Change the IP address to the actual one.
         "10.0.0.2",//Change the IP address to the actual one.
       ],
       "allocation_pools": [
         {
           "start": "10.0.10.2",
           "end": "10.0.10.254"
         }
    ],
    "host_routes": [],
    "ip_version": 4,
    "gateway_ip": "10.0.10.1",
    "cidr": "10.0.10.0/24",
    "id": "e0fa7de1-a6e2-44c9-b052-b9d8cebe93c4"
   }
}

In SAP HANA network planning, you must configure network planes, regardless of whether you create HANA ECSs to work in single-node mode or cluster mode. Three network planes are required generally. This section provides network plane planning examples.

Network Plane Planning in the Single-Node Scenario Where HA Is Not Required

Figure 1 shows the network plane planning in the single-node scenario where HA is not required.

NOTE:

The network segments and IP addresses are for reference only.

Figure 1 Network planning in the single-node scenario where HA is not required

In this scenario, only one NIC is used for network communication.

Table 1 shows the planned network information.

Table 1 Network planning in the single-node scenario where HA is not required

Parameter

Description

Example

IP address of the server/client plane

Allows an SAP HANA node to communicate with service software (such as ERP) or SAP HANA Studio client software.

SAP HANA node: 10.0.3.2

SAP HANA Studio: 10.0.3.102

NAT server: 10.0.3.202

EIP

Allows you to access the SAP HANA Studio and NAT server.

Automatically assigned

Create a network and subnet according to the preceding network plan. An example structure for creating the subnet is as follows:

{
    "subnet": {
      "name": "subnetsinglenode",
      "enable_dhcp": true,
      "network_id": "${netid}",
      "tenant_id": "${tenanted}",
      "dns_nameservers": [
         "10.0.0.1",//Change the IP address to the actual one.
         "10.0.0.2",//Change the IP address to the actual one.
      ],
      "allocation_pools": [
        {
         "start": "10.0.3.2",
         "end": "10.0.3.254"
         }
      ],
      "host_routes": [],
      "ip_version": 4,
      "gateway_ip": "10.0.3.1",
      "cidr": "10.0.3.0/24"
     }
}