Show subnet
Shows information for a specified subnet.
URI
/v2.0/subnets/{subnet_id}
Description of the URI:
{subnet_id} UUID The UUID for the subnet of interest to you.
HTTP method
GET
Response status
| Status code | Description | 
|---|---|
| 200 | Normal response codes | 
| unauthorized (401) | Error response codes | 
| itemNotFound (404) | Error response codes | 
Response body (normal status)
       {
        "subnet": {
         "name": "my_subnet",
         "enable_dhcp": true,
         "network_id": "d32019d3-bc6e-4319-9c1d-6722fc136a22",
         "tenant_id": "4fd44f30292945e481c7b8a0c8908869",
         "dns_nameservers": [],
         "gateway_ip": "192.0.0.1",
         "ipv6_ra_mode": null,
         "allocation_pools": [
          {
           "start": "192.0.0.2",
           "end": "192.255.255.254"
          }
         ],
         "host_routes": [],
         "ip_version": 4,
         "ipv6_address_mode": null,
         "cidr": "192.0.0.0/8",
         "id": "54d6f61d-db07-451c-9ab3-b9609b6b6f0b",  
         "subnetpool_id": null,
         "availability_zone": "AZ1"
        }
       }
     
   Description of response body (normal status)
| Item | Description | 
|---|---|
| name | The subnet name. | 
| network_id | The ID of the attached network. | 
| tenant_id | The ID of the project who owns the network. | 
| dns_nameservers | A list of DNS name servers for the subnet. For example ["8.8.8.7", "8.8.8.8"]. The specified IP addresses are displayed in sorted order in ascending order. The lowest IP address will be the primary DNS address.  | 
            
| allocation_pools | The start and end addresses for the allocation pools. | 
| host_routes | A list of host route dictionaries for the subnet. For example: | 
            
| gateway_ip | The gateway IP address. | 
| ip_version | The IP version, which can be 4 or 6. | 
| cidr | The CIDR. | 
| id | The ID of the subnet. | 
| enable_dhcp | Set to "true" if DHCP is enabled, or "false" otherwise. | 
| availability_zone | The Availability Zone name. | 
| ipv6_ra_mode | This attribute is used to specify if the Networking service should transmit ICMPv6 packets, for a subnet. This value is null.  | 
            
| ipv6_address_mode | This attribute is used to control how addressing is handled by OpenStack. There are a number of different ways that guest instances can obtain an IPv6 address, and this attribute exposes these choices to users of the Networking API. This value is null.  | 
            
| subnetpool_id | The UUID of the subnet pool. This value is null.  |