Management Plane API > Networking > Logical Routing And Services > Logical Router Ports

Create a Logical Router Port

Creates a logical router port. The required parameters include resource_type
(LogicalRouterUpLinkPort, LogicalRouterDownLinkPort, LogicalRouterLinkPort,
LogicalRouterLoopbackPort, LogicalRouterCentralizedServicePort); and
logical_router_id (the router to which each logical router port is assigned).
The service_bindings parameter is optional.

Request:

Method:
POST
URI Path(s):
/api/v1/logical-router-ports
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
LogicalRouterCentralizedServicePort+
LogicalRouterDownLinkPort+
LogicalRouterLinkPortOnTIER0+
LogicalRouterLinkPortOnTIER1+
LogicalRouterLoopbackPort+
LogicalRouterUpLinkPort+

Example Request:

POST https://<nsx-mgr>/api/v1/logical-router-ports { "resource_type": "LogicalRouterDownLinkPort", "logical_router_id": "723c1e3e-c82c-4243-bba0-2e1ef4815143", "linked_logical_switch_port_id": { "target_type": "LogicalPort", "target_id": "18691381-b08f-4d90-8c0c-98d0e449b141" }, "subnets": [ { "ip_addresses": [ "172.16.40.1" ], "prefix_length": 24 } ] }

Successful Response:

Response Code:
201 Created
Response Headers:
Location
Content-type: application/json
Response Body:
LogicalRouterCentralizedServicePort+
LogicalRouterDownLinkPort+
LogicalRouterLinkPortOnTIER0+
LogicalRouterLinkPortOnTIER1+
LogicalRouterLoopbackPort+
LogicalRouterUpLinkPort+

Example Response:

{ "resource_type": "LogicalRouterLinkPort", "_revision": 0, "id": "4a0d8003-0958-4911-a32b-3a5a51f18d95", "logical_router_id": "7a62a0c5-1ea1-4b25-9d43-dce1c0fa4b8c", "resource_type": "LogicalRouterDownLinkPort", "id": "b5ceef62-cc10-424a-96ed-8c2d5989cd50", "display_name": "b5ceef62-cc10-424a-96ed-8c2d5989cd50", "logical_router_id": "723c1e3e-c82c-4243-bba0-2e1ef4815143", "mac_address": "02:50:56:56:44:52", "linked_logical_switch_port_id": { "target_display_name": "db2-switch-to-t1-router", "is_valid": true, "target_type": "LogicalPort", "target_id": "18691381-b08f-4d90-8c0c-98d0e449b141" }, "subnets": [ { "ip_addresses": [ "172.16.40.1" ], "prefix_length": 24 } ], "_last_modified_time": 1458848284438, "_create_time": 1458848284438, "_last_modified_user": "admin", "_system_owned": false, "_create_user": "admin", "_revision": 0 }

Required Permissions:

crud

Feature:

routing_routers

Additional Errors: