Creating a Network Load Balancer Listener

Create a listener that checks for incoming traffic on the IP address of a network load balancer.

For prerequisite information, see Listeners for Network Load Balancers.
Note

If you selected L3 IP as the listener traffic type, the backend set you select must have the preserve source ID feature enabled. Only those backend sets with that feature enabled are available to select from the Backend set list.
    1. On the Network load balancers list page, select the network load balancer that you want to work with. If you need help finding the list page or the network load balancer, see Listing Network Load Balancers.
    2. On the details page, select Listeners.
    3. Select Create listener.
    4. Enter the following information:
      • Name: Specify a friendly name for the listener. The name must be unique, and can't be changed. Avoid entering confidential information.
      • Protocol: Select one of the following options:
        • Public network load balancers:
          • UDP
          • TCP
          • UDP/TCP
          • L3 IP
        • Private network load balancers:
          • UDP
          • TCP
          • TCP/UDP/ICMP
          • UDP/TCP
          • L3 IP
      • IP protocol version: Required if you previously enabled IPv6 Address Assignment. The load balancer listener and backend set must use the same IP protocol version.
      • Ingress traffic port: Select one of the following options to specify the port your listener monitors for ingress traffic depending on the traffic type:
        • Public network load balancers:
          • Use any port: This option uses a 0 or wildcard as the port.
          • Select the port: Enter the port you want to use.
        • Private network load balancers:
          • Use any port: This option uses a 0 or wildcard as the port.
          • Select the port: (UDP, TCP, and UDP/TCP only) Enter the port you want to use.
        • UDP and TCP: Select one of the following options:
          • Use any port: This option uses a 0 or wildcard as the port.
          • Select the Port: Enter the port you want to use.
        • UDP/TCP: Uses any port.
      • Backend set: Specify the default backend set to which the listener routes traffic from the list.
        Note

        If you selected L3 IP as the listener traffic type, the backend set you select must have the preserve source ID feature enabled. Only those backend sets with that feature enabled are available to select from the Backend set list.
      • Timeout:
        Enter the timeout for each traffic type in seconds. If you don't enter a timeout value, the default values are used. The number of timeout values you must enter varies depending on the listener traffic type you selected earlier:
        • UDP: One timeout. Default is ???
        • TCP: One timeout. Default is ???
        • UDP/TCP: Two timeouts, one for each protocol (UDP and TCP). Default is ???
        • L3 IP: Three timeouts, for one for each protocol (L3 IP, UDP, and TCP). Default is ???
    5. Select Create listener.
    The listener you create appears in the Listener list of the network load balancer.
  • Use the oci nlb listener create command to create a listener for a network load balancer:

    oci nlb listener create --name name --default-backend-set-name --protocol protocol --port port default_backend_set_name --network-load-balancer-id network_load_balancer_ocid [OPTIONS]

    For the protocol on which the listener accepts connection requests, use one of the following values:

    • TCP: Allows only TCP traffic on a specific or all ports.
    • UDP: Allows only UDP traffic on a specific or all ports.
    • TCP_AND_UDP: Allows both TCP and UDP traffic on a specific or all ports.
    • ANY: Allows both TCP and UDP traffic on any port and also allows ICMP traffic. This option is only for SRC/DST header preserved mode (transparent mode).
    • L3IP: Allows Layer 3 IP traffic.

    See Changing a Listener's Idle Timeout to change the default idle timeout settings for listeners.

    For a complete list of parameters and values for CLI commands, see the CLI Command Reference.

  • Run the CreateListener operation to create a listener for a network load balancer.