copyright | lastupdated | keywords | subcollection | ||
---|---|---|---|---|---|
|
2021-03-15 |
custom routes |
vpc |
{{site.data.keyword.attribute-definition-list}}
{: #list-routes-routing-table}
You can list the routes of a VPC routing table by using the UI, CLI, or API. {: shortdesc}
{: #cr-list-using-the-ui} {: ui}
To list the routes of a VPC routing table by using the {{site.data.keyword.cloud_notm}} console, follow these steps:
-
From the {{site.data.keyword.cloud_notm}} console{: external}, select the Menu icon , then click VPC Infrastructure > Routing tables in the Network section. The Routing tables for VPC page appears.
{: caption="Figure 1. Listing routing table routes" caption-side="bottom}
-
Click the routing table name or number of routes that are associated with the routing table.
The Routing table details page appears, listing the routes associated with the routing table.
{: caption="Figure 2. Destination routes table" caption-side="bottom}
Descriptions of these columns are as follows:
Column | Description |
---|---|
State | The lifecycle state. Custom route states are: \n * Pending - In the process of being provisioned in the specified VPC and zone. \n * Stable - Provisioning was successful. \n * Deleting - A Stable or Failed route is in the process of being deleted. \n * Deleted - Deletion was successful. \n * Failed - The route is not functional. From this state, you can delete only the route. |
Destination | Destination CIDR of the route. |
Action | Values are: \n * Deliver - Routes the packet to the next hop target. You can add multiple routes with the same address prefix. The virtual router performs equal-cost, multi-path routing (ECMP) by using the different next hop IP addresses. \n * Drop - Drops the packet. \n * Delegate - Routes the packet by using the system routing table. 1 |
Type | Either IP Address or VPN Connection. |
Next hop | The IP address of the next hop to which to route packets. |
Location | The region associated with the VPC. |
{: caption="Table 1. Destination routes details" caption-side="bottom"} |
1 - A system routing table is maintained for each VPC. A VPC can have a presence in multiple zones, and the VPC's system routing table is different in each zone. It is used for routing traffic when no matching route is found in the custom routing table that is associated with the subnet of which the traffic is egressing.
{: #cr-view-details-route-using-the-cli} {: cli}
Before you begin, make sure to set up your CLI environment.
To view details of a route by using the CLI, run the following command:
ibmcloud is vpc-routing-table-route VPC ROUTING_TABLE ROUTE [--json]
{: pre}
Where:
- VPC is the ID of the VPC.
- ROUTING_TABLE is the ID of the VPC routing table.
- ROUTE is the ID of the VPC route.
- --json formats output in JSON.
{: #cr-view-details-route-using-the-api} {: api}
To view details of a route by using the API, follow these steps:
-
Set up your API environment.
-
Store the following values in variables to be used in the API command:
export VpcId=<your_vpc_id> export RoutingTableId=<your_routing_table_id> export RouteId=<your_route_id>
{: codeblock}
-
View details of a specific route:
curl -X GET "$vpc_api_endpoint/v1/vpcs/$VpcId/routing_tables/$RoutingTableId/routes/$RouteId?version=$api_version&generation=2" \ -H "Authorization: $iam_token"
{: codeblock}