> ## Documentation Index
> Fetch the complete documentation index at: https://docs.megaport.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Creating NAT Gateway Connections to Latitude.sh

> This help topic describes how to create a connection between a Megaport NAT Gateway and Latitude.sh.

export const Link = ({href, children}) => {
  const errorPrefix = '\x1b[31;1;4mERROR\x1b[0m: Link -';
  if (typeof href !== 'string') {
    href = String(href);
  }
  if (!href || href === 'undefined') {
    console.error(`${errorPrefix} the \`href\` property is required — rendering an empty string instead`);
    return <></>;
  }
  if (href.includes('{') || href.toUpperCase().includes('%7B')) {
    console.error(`${errorPrefix} could not resolve a variable in href "${href}" — rendering an empty string instead`);
    return <></>;
  }
  const isExternal = (/^https?:\/\//).test(href);
  return <a href={href} className="link" target={isExternal ? '_blank' : undefined} rel={isExternal ? 'noreferrer' : undefined}>
      {children ?? href}
      {isExternal && <span className="sr-only"> (opens in a new tab)</span>}
    </a>;
};

export const LatShPrerequisites = ({companyShort, latitudeLong, latitudePortalname, product, productArticle, createLink}) => {
  const productArticleUpper = productArticle.charAt(0).toUpperCase() + productArticle.slice(1);
  return <>
      <p>
        Before you create a connection to {latitudeLong}, make sure you have:
      </p>
      <ul>
        <li>
          <strong>A {companyShort} account</strong> — If you do not have an
          account, see{' '}
          <a className="link" href="/setting-up/">
            Setting Up a {companyShort} Account
          </a>
          .
        </li>
        <li>
          <strong>A {latitudeLong} account</strong> — A {latitudeLong} company
          account is automatically created the first time a user from your{' '}
          {companyShort} organization signs in to the {latitudePortalname} with
          their {companyShort} account.
          <br />
          For more information, see{' '}
          <a className="link" href="/portal-admin/connect-latitude/">
            Connecting to {latitudeLong}
          </a>
          .
        </li>
        <li>
          <strong>
            {productArticleUpper} {product}
          </strong>{' '}
          -- If you do not have {productArticle} {product}, see{' '}
          <a className="link" href={createLink}>
            Creating {productArticle} {product}
          </a>
          .
        </li>
      </ul>
    </>;
};

export const LatShIntro = ({companyShort, latitudeLong, vxcShort, product, productArticle}) => {
  return <>
      {latitudeLong} is a {companyShort}-owned bare metal and cloud
      infrastructure provider. You can create a {vxcShort} from {productArticle}{' '}
      {product} to {latitudeLong} to route traffic between {latitudeLong} and
      other cloud environments on the {companyShort} network without requiring
      physical infrastructure.
    </>;
};

export const Image = ({src, alt = '', caption, width, height, shadow}) => {
  const errorPrefix = '\x1b[31;1;4mERROR\x1b[0m: Image -';
  if (typeof src !== 'string') {
    src = String(src);
  }
  if (!src || src === 'undefined') {
    console.error(`${errorPrefix} \`src\` is required — rendering an empty string instead`);
    return <></>;
  }
  const img = <img className={['mega-image-style', shadow ? 'shadow' : ''].join(' ')} src={src} alt={alt} width={width} height={height} style={{
    display: 'block'
  }} />;
  return caption ? <figure>
      {img}
      <figcaption style={{
    textAlign: 'center',
    width
  }}>{caption}</figcaption>
    </figure> : img;
};

<LatShIntro companyShort="Megaport" latitudeLong="Latitude.sh" vxcShort="VXC" product="NAT Gateway" productArticle="a" />

BGP is required for all Latitude.sh connections. To create a connection, specify an ASN, BGP password, and the prefixes to advertise. The connection becomes live after Latitude.sh approves the request.

## Prerequisites

<LatShPrerequisites companyShort="Megaport" latitudeLong="Latitude.sh" latitudePortalname="Latitude.sh Portal" product="NAT Gateway" productArticle="a" createLink="/nat/creating-nat-gateway/" />

## Creating a connection to Latitude.sh

To set up a connection to Latitude.sh with Megaport, you need to create a VXC from your NAT Gateway in the Megaport Portal to the Latitude.sh location where you have provisioned your Latitude.sh services.

**To create a connection to Latitude.sh**

1. In the <Link href="https://portal.megaport.com">Megaport Portal</Link>, go to the **Services** page.

2. Select the NAT Gateway you want to use.\
   If you haven't created a NAT Gateway, see [Creating a NAT Gateway](/nat/creating-nat-gateway).

3. Click **+Connection**, click **Cloud**, then click **Compute via Latitude.sh**.

4. Select the target location for your connection then click **Next**.
   <Image src="/images/snippets/cloud/connections/latitude-tile-select-port.png" shadow={true} width={600} />

5. Specify the connection details:

   * **Connection Name** -- The name of your VXC to be shown in the <Link href="https://portal.megaport.com">Megaport Portal</Link>.

   * **Service Level Reference** (optional) -- Specify a unique identifying number for your Megaport service to be used for billing purposes, such as a cost center number, unique customer ID, or purchase order number. The service level reference number appears for each service under the Product section of the invoice. You can also edit this field for an existing service.

   * **Rate Limit** -- The speed of your connection in Mbps.

   * **VXC State** -- Select **Enabled** or **Shut Down** to define the initial state of the connection. For more information, see [Shutting Down a VXC for Failover Testing](/connections/shut-down-vxc/).

     <Note>
       If you select **Shut Down**, traffic will not flow through this service and it will behave as if it was down on the Megaport network. Billing for this service will remain active.
     </Note>

   * **Minimum Term** -- Select No Minimum Term, 12 Months, 24 Months, 36 Months, 48 Months, or 60 Months. Longer terms result in a lower monthly rate. *12 Months* is selected by default. Take note of the information on the screen to avoid early termination fees (ETF).

     Enable the [Minimum Term Renewal](/portal-admin/auto-renew/#auto-renew) option for services with a 12, 24, 36, 48 or 60-month term to automatically renew the contract at the same discounted price and term length at the end of the contract. If you don't renew the contract, at the end of the term,  the contract will automatically roll over to month-to-month contract for the following billing period, at the same price, without term discounts.

   * **Resource Tags** -- You can use resource tags to add your own reference metadata to a Megaport service.\
     To add a tag:

     1. Click **Add Tags**.
     2. Click  **Add New Tag**.
     3. Enter details into the fields:
        * **Key** -- string maximum length 128. Valid values are a-z 0-9 \_ : . / \ -
        * **Value** -- string maximum length 256. Valid values are a-z A-Z 0-9 \_ : . @ / + \ - (space)
     4. Click **Save**.

     If you already have resource tags for that service, you can manage them by clicking **Manage Tags**.

     <Warning>
       Never include sensitive information in a resource tag. Sensitive information includes commands that return existing tag definitions and information that will identify a person or company.
     </Warning>

   <Image src="/images/nat/nat-gateway-vxc-connection-details.png" shadow={true} width={600} />

6. Click **Next**.

7. Review the NAT Gateway A-End connection details.\
   For more information, see [Configuring a NAT Gateway VXC](/nat/configuring-nat-vxc/).

8. Click **Next**.\
   A summary page appears that includes the monthly cost.
   <Image src="/images/snippets/cloud/connections/latitude-tile-summary-page.png" shadow={true} width={600} />

9. Click **Back** to make changes, or click **Add VXC**.

10. Click **Review Order** to proceed through the checkout process, or click **Save** to save the configured services before placing the order.

11. Review the Important Information section and confirm agreement with the Service Agreements.

    If you do not have a promotion code, skip to the **Order Now** step. If you do have a promotion code, enter it into the **Enter discount code** field then click **Apply**. Alternatively, if a code already appears in the **Discounts** field, verify it is correct and click **Apply**.

    The promotional discount appears below the Standard Term discount.  This discount is not reflected in the Monthly Rate shown here, it is applied at the time of billing.  If an invalid or expired code causes an error with your order, contact your Megaport Account Manager for a replacement code.

    <Image src="/images/snippets/add-promo-code.png" alt="Add Promo Code" shadow={true} width={750} />

    If you entered an incorrect promotion code, you can remove it by clicking **Remove**.

12. Click **Order Now**.

The connection becomes live after Latitude.sh approves the request.

<Note>
  After ordering, the connection status shows *Deployable* until it is provisioned. When Latitude.sh approves the connection and provisioning is complete, the status updates to *Configured*.
</Note>

## Helpful references

* [Connecting to Latitude.sh](/portal-admin/connect-latitude)
* [Creating a NAT Gateway](/nat/creating-nat-gateway)
* <Link href="https://www.latitude.sh/docs">Latitude.sh docs</Link>
* [VXC Pricing and Contract Terms](/finance/vxc-pricing)
