nsxt_logical_router_ports – Create a Logical Router Port description: 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

New in version 2.7.

Parameters

Parameter Choices/Defaults Comments
admin_state
string
Admin state of port.
description
string
Description of the resou
display_name
string / required
Display name
edge_cluster_member_index
list
Member index of the edge node on the cluster
enable_multicast
boolean
    Choices:
  • no
  • yes
Flag to enable/disable Multicast
enable_netx
boolean
Port is exclusively used for N-S service insertion
hostname
string / required
Deployed NSX manager hostname.
linked_logical_router_port_id
dictionary
Identifier of connected LogicalRouterLinkPortOnTIER1 of TIER1 logical router
linked_logical_switch_port_id
dictionary
Reference to the logical switch port to connect to
logical_router_name
string / required
Name of the logical router
mac_address
string
MAC address
mtu
integer
Maximum transmission unit specifies the size of the largest packet that a network protocol can transmit. If not specified, the global logical MTU set in the /api/v1/global-configs/RoutingGlobalConfig API will be used.
ndra_prefix_config
list
Configuration to override the neighbor discovery router advertisement prefix time parameters at the subnet level. Note that users are allowed to override the prefix time only for IPv6 subnets which are configured on the port.
ndra_profile_id
string
NDRA Profile id
password
string / required
The password to authenticate with the NSX manager.
pim_config
dictionary
PIM configuration parameters
resource_type
string / required
LogicalRouterUpLinkPort is allowed only on TIER0 logical router. It is the north facing port of the logical router. LogicalRouterLinkPortOnTIER0 is allowed only on TIER0 logical router. This is the port where the LogicalRouterLinkPortOnTIER1 of TIER1 logical router connects to. LogicalRouterLinkPortOnTIER1 is allowed only on TIER1 logical router. This is the port using which the user connected to TIER1 logical router for upwards connectivity via TIER0 logical router. Connect this port to the LogicalRouterLinkPortOnTIER0 of the TIER0 logical router. LogicalRouterDownLinkPort is for the connected subnets on the logical router. LogicalRouterLoopbackPort is a loopback port for logical router component which is placed on c hosen edge cluster member. LogicalRouterIPTunnelPort is a IPSec VPN tunnel port created on logical router when route based VPN session configured. LogicalRouterCentralizedServicePort is allowed only on Active/Standby TIER0 and TIER1 logical router. Port can be connected to VLAN or overlay logical switch. Unlike downlink port it does not participate in distributed routing and hosted on all edge cluster members associated with logical router. Stateful services can be applied on this port.
routing_policies
list
Routing policies used to specify how the traffic, which matches the policy routes, will be processed.
service_bindings
array of ServiceBinding
Service Bindings
state
- / required
    Choices:
  • present
  • absent
State can be either 'present' or 'absent'. 'present' is used to create or update resource. 'absent' is used to delete resource.
subnets
array of IPSubnet
Logical router port subnets
tags
list
Opaque identifiers meaningful to the API user
urpf_mode
string
Unicast Reverse Path Forwarding mode
username
string / required
The username to authenticate with the NSX manager.
vpn_session_id
string
Associated VPN session identifier.

Examples

- name: Create a Logical Router Port
  nsxt_logical_routers_ports:
      hostname: "10.192.167.137"
      username: "admin"
      password: "Admin!23Admin"
      validate_certs: False
      resource_type: LogicalRouterDownLinkPort
      logical_router_name: "lr-1"
      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
      state: present

Status

  • This module is not guaranteed to have a backwards compatible interface. [preview]

  • This module is maintained by the Ansible Community. [community]

Authors

  • Rahul Raghuvanshi