Subnets

Subnet Introduction

In the Networking > Subnets view, an IP subnet can be defined in a standard CIDR format, and assigned a name for easy reference throughout the UI. It is used primarily for association with a VPC as described in VPC Introduction. VPC subnets are defined by the following constraints:

  1. The first four IP addresses and the last IP address in each subnet CIDR block are not available for users, and cannot be assigned to an instance.

  2. The second address of the subnet is reserved for the router.

  3. The CIDR block of a subnet may be either identical to the VPC’s CIDR block, which is the case when there is a single subnet, or a subset of the VPC’s CIDR block, when there are multiple subnets. In the latter case, the CIDR blocks of the subnets cannot overlap. The permitted block size ranges from a /28 netmask to a /16 netmask.

  4. Every subnet that is created is automatically associated with the main route table of the VPC. You can change the association. A subnet can be associated with only one route table at a time.

Creating a Subnet

To create a subnet:

  1. Navigate to the Networking > Subnets view.

  2. From the top toolbar, click Create.

  3. In the Create Subnet dialogue, enter the following:

    • Name - name of the subnet.

    • Description - optional description of the subnet.

    • VPC - VPC which is associated with this subnet.

    • CIDR - subnet in CIDR format based on IP/mask.

Subnet Operations

After creation of a subnet, it will be displayed in the subnet list in the Networking > Subnets view. The following operations can be performed by selecting a subnet from the list, and clicking the appropriate icon.

From top toolbar:

  • Modify - change name of the subnet.

  • Set Default - set subnet as default for a VPC, to be used for

    provisioning new entities within the VPC. For example, if a new VM instance is associated with a VPC, it will be configured with an IP from the default subnet.

  • Delete

  • Test connectivity - use ping or arping to test connectivity to specific IP within the selected subnet. For more information on subnet testing, see Testing Subnet Connectivity.

From lower toolbar:

  • VMs - view information on VMs associated with the selected subnet.

  • Events - view configuration events (info) or alarms for the subnet.

Note

In the displayed subnet list, there is an indication of Direct Subnet. Direct subnets are managed by the cloud admin. A direct subnet allows the establishment of an external and dedicated VPSA (Storage Array and/or Object Storage) while bypassing unnecessary internet routers. This is extremely common and useful where a dedicated and high-speed NAS/Object Storage solution is required.

Testing Subnet Connectivity

Connectivity between a VPC Subnet and a specific IP address can be tested by ping using either the GUI or CLI.

Using the GUI

  1. Navigate to the Networking > Subnets view.

  2. Select a subnet from the displayed list and click Test Connectivity in top toolbar.

  3. In the Test Connectivity window, enter a Destination IP address.

  4. Select ping or arping.

    Note

    Ping checks layer 3 connectivity and is blocked by security-group filtering, if traffic is not allowed from any IP in the subnet. Arping check layer 2 connectivity and bypasses security-group filtering.

  5. Click OK.

  6. Click OK. A message is displayed that the connectivity test is taking place.

  7. A few seconds later, the test results will be displayed indicting success or failure as well as other relevant details. This status report is also available in the right-hand sidebar.

Using the CLI

  1. The ‘guestnet-admin-tool ping-ip create’ command with which you can test a subnet’s connectivity requires the ID of the given subnet (see ‘entity_id’ below). Note: ‘–command-type’ is either ‘ping’ (default) or ‘arping’

    guestnet-admin-tool ping-ip create [-h]
                                       [-f {adaptive_table,json,shell,table,value,yaml}]
                                       [-c COLUMN] [--max-width <integer>]
                                       [--noindent] [--prefix PREFIX]
                                       [-m [NAME=VALUE [NAME=VALUE ...]]]
                                       [--command-type COMMAND_TYPE]
                                       [--name NAME]
                                       entity_id dest_ip
    
  2. Run the ‘vpc network list’ command to locate the ID of Subnet-1.

    vpc network list -c id -c name
    
  3. This returns a list of subnets and their IDs.

    +--------------------------------------+-----------------------------------------------------+
    | id                                   | name                                                |
    +======================================+=====================================================+
    | ceff2b60-fb75-44d0-8b1a-ac4034b260dc | Subnet-1                                            |
    +--------------------------------------+-----------------------------------------------------+
    
  4. Test the connectivity of Subnet-1 to the destination IP address 8.8.8.8.

    guestnet-admin-tool ping-ip create ceff2b60-fb75-44d0-8b1a-ac4034b260dc 8.8.8.8
    
  5. This returns a temporary, pending status of the subnet’s connectivity.

    +--------------+--------------------------------------+
    | id           | 2ce18cc5-b1a8-401c-ae98-99e484f99b3e |
    | name         | none                                 |
    | status       | pending                              |
    | command_type | ping                                 |
    | created_at   | 2019-05-12T13:39:56.650560           |
    | dest_ip      | 8.8.8.8                              |
    | entity_id    | ceff2b60-fb75-44d0-8b1a-ac4034b260dc |
    | output       | -                                    |
    | project_id   | 07650a05e9dd47c8a3b874a2132e178c     |
    | updated_at   | 2019-05-12T13:39:56.650581           |
    | user_id      | admin                                |
    +--------------+--------------------------------------+
    
  6. Wait a few seconds and then request the final status of Router-1’s connectivity test by using the ‘guestnet-admin-tool ping-ip get ping_ip_id’, as follows:

    guestnet-admin-tool ping-ip get 2ce18cc5-b1a8-401c-ae98-99e484f99b3e
    
  7. This returns the final, succeeded/failed status of Router-1’s connectivity test with relevant output details.

    +--------------+----------------------------------------------------------------+
    | id           | 2ce18cc5-b1a8-401c-ae98-99e484f99b3e                           |
    | name         | none                                                           |
    | status       | succeeded                                                      |
    | command_type | ping                                                           |
    | created_at   | 2019-05-12T13:39:56                                            |
    | dest_ip      | 8.8.8.8                                                        |
    | entity_id    | ceff2b60-fb75-44d0-8b1a-ac4034b260dc                           |
    |              +----------------------------------------------------------------+
    | output       | PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.                   |
    |              | 64 bytes from 8.8.8.8: icmp_seq=1 ttl=118 time=55.1 ms         |
    |              | 64 bytes from 8.8.8.8: icmp_seq=2 ttl=118 time=53.3 ms         |
    |              |                                                                |
    |              | --- 8.8.8.8 ping statistics ---                                |
    |              | 2 packets transmitted, 2 received, 0% packet loss, time 1001ms |
    |              | rtt min/avg/max/mdev = 53.335/54.219/55.104/0.914 ms           |
    |              |                                                                |
    |              +----------------------------------------------------------------+
    | project_id   | 07650a05e9dd47c8a3b874a2132e178c                               |
    | updated_at   | 2019-05-12T13:39:59                                            |
    | user_id      | admin                                                          |
    +--------------+----------------------------------------------------------------+
    

    Note

    This information is automatically deleted after approximately one hour.

Additional options for Subnet (VPC) Connectivity Testing

  1. Delete a specific subnet connectivity test

    guestnet-admin-tool ping-ip delete ping_ip_id
    
  2. List all ping_ip requests

    guestnet-admin-tool ping-ip list