> ## 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.

# Troubleshooting a NAT Gateway Routing Issue

> This help topic describes the troubleshooting steps and actions to take when a NAT Gateway is experiencing a routing issue.

export const Video = ({url, text, duration, description}) => {
  const errorPrefix = '\x1b[31;1;4mERROR\x1b[0m: Video -';
  if (typeof url !== 'string') {
    url = String(url);
  }
  if (typeof text !== 'string') {
    text = String(text);
  }
  if (!url || url === 'undefined') {
    console.error(`${errorPrefix} the \`url\` property is required — rendering an empty string instead`);
    return <></>;
  }
  if (!text || text === 'undefined') {
    console.error(`${errorPrefix} the \`text\` property is required — rendering an empty string instead`);
    return <></>;
  }
  const youtubeIconMask = "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 576 512'%3E%3Cpath d='M549.7 124.1c-6.3-23.7-24.8-42.3-48.3-48.6C458.8 64 288 64 288 64S117.2 64 74.6 75.5c-23.5 6.3-42 24.9-48.3 48.6-11.4 42.9-11.4 132.3-11.4 132.3s0 89.4 11.4 132.3c6.3 23.7 24.8 41.5 48.3 47.8C117.2 448 288 448 288 448s170.8 0 213.4-11.5c23.5-6.3 42-24.2 48.3-47.8 11.4-42.9 11.4-132.3 11.4-132.3s0-89.4-11.4-132.3zM232 336V176l142.7 80z'/%3E%3C/svg%3E\")";
  return <div className="video-callout">
      <div className="callout my-4 flex gap-3 overflow-hidden rounded-2xl border px-5 py-4">
        <div className="mt-0.5 w-4 shrink-0" data-component-part="callout-icon">
          <svg aria-hidden="true" className="size-4 shrink-0" style={{
    WebkitMaskImage: youtubeIconMask,
    maskImage: youtubeIconMask,
    WebkitMaskRepeat: 'no-repeat',
    maskRepeat: 'no-repeat',
    WebkitMaskPosition: 'center',
    maskPosition: 'center',
    backgroundColor: '#0284c7'
  }} />
        </div>
        <div className="min-w-0 w-full text-sm" data-component-part="callout-content">
          <strong>
            Video:{' '}
            <a href={url} target="_blank" rel="noopener noreferrer">
              {text}
              <span className="sr-only"> (opens in a new tab)</span>
            </a>
          </strong>
          {}
          {duration && <> ({duration})</>}
          {}
          {description && <p className="mt-1 mb-0 text-xs text-gray-500 dark:text-gray-400">
              {description}
            </p>}
        </div>
      </div>
    </div>;
};

export const Gloss = ({term, anchor, langDir = 'en'}) => {
  const errorPrefix = '\x1b[31;1;4mERROR\x1b[0m: Gloss -';
  if (typeof term !== 'string') {
    term = String(term);
  }
  if (typeof anchor !== 'string') {
    anchor = String(anchor);
  }
  if (!term || term === 'undefined') {
    console.error(`${errorPrefix} the \`term\` property is required — rendering an empty string instead`);
    return <></>;
  }
  if (!anchor || anchor === 'undefined') {
    console.error(`${errorPrefix} the \`anchor\` property is required — rendering an empty string instead`);
    return <></>;
  }
  const lang = langDir === 'en' ? '/' : '/' + langDir + '/';
  const glossaryPage = lang + 'glossary/#' + anchor;
  return <a href={glossaryPage}>{term}</a>;
};

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;
};

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>;
};

When Megaport NAT Gateway (NAT Gateway) is experiencing a routing issue, step through these troubleshooting actions.

<Video url="https://youtu.be/XSNm5q3d3n0" text="How to Check the Network Latency" duration="1:23" description="This video shows how to check latency between Megaport points of presence and compare latency values across the Megaport network." />

## Troubleshooting actions

| **Action**                                                                                            | **Steps**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| :---------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Perform a <Gloss term="ping" anchor="ping" /> test between the source and destination**             | A **ping** test transmits data packets to a specific IP address and either confirms or denies connectivity between IP-networked devices. In the case of confirmation, a **ping** test shows the latency (the response time) of the connection. Provide the IP address and the subnet mask of services on the Megaport end used for the **ping** test.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| **Perform a <Gloss term="Traceroute" anchor="traceroute" /> test between the source and destination** | **Traceroute** testing can help to determine if a destination is reachable. **Traceroute** sends a sequence of <Gloss term="UDP" anchor="udp" /> packets between two points and shows you the route the packets take. **Traceroute** also measures the transit delays of packets across an IP network.<br />From the host that is originating traffic (A-End), start the **traceroute** to the destination host. Then run the **traceroute** from the destination host (B-End) to the origin host. Commands and flags might differ by device.<br /><br />**Analyze the results**<ol><li>Look for asymmetric routing. If the traffic is not taking the same path, there might be asymmetric routing somewhere in the network.</li> <li> Are there any places in the **traceroute** where the response time has increased markedly? If so, are those delays within your network?</li><li>Are there any firewalls or access list rules prohibiting traffic from reaching its destination?</li></ol> |
| **Verify routing configurations and routing tables**                                                  | <ol><li>Confirm both Layer 2 and Layer 3 configurations.</li><li>Review metrics, route filters, firewalls, and traffic shaping.</li><li> Verify the routing table (Layer 3) and confirm whether the prefix in question is reachable and on the expected routing path to Megaport.</li><li>Confirm that the gateway (the device facing the NAT Gateway) is advertising the required prefix if a route filter is in place.</li><li>Confirm the NAT Gateway routing table.</li></ol>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |

## Ping and traceroute

Megaport provides standard network diagnostic tools, such as ping and traceroute, directly from a NAT Gateway.

You can run diagnostic requests via the Megaport Portal or the Megaport API. After the tests are complete, the real-time results are retrieved and displayed in the Portal.

<Note>
  * Diagnostic requests (ping or traceroute) are initiated against a specified NAT Gateway.
  * The destination must be a valid IPv4 or IPv6 address.
  * The source must be a valid IPv4 or IPv6 address that is configured on the NAT Gateway interface.
  * You cannot cancel a running diagnostic request. The request must complete or naturally time out, then return the result before the next request will run.
</Note>

**To run a ping test**

Ping is available only on NAT Gateway with at least one active VXC connection.

1. Log in to the <Link href="https://portal.megaport.com">Megaport Portal</Link> and choose **Services**.

2. Click the Service Diagnostics icon or the Looking Glass icon.
   <Image src="/images/troubleshooting/nat/natg-service-diagnostics-looking-glass-icons.png" alt="Service diagnostics icon" shadow={true} width={980} />

3. Click the **Ping** tab.
   <Image src="/images/troubleshooting/nat/natg-ping.png" alt="Ping tab" shadow={true} width={400} />

4. Type the destination IP into the **Destination IP** field, then click **Run Ping**.\
   Latency results are returned.

   <Image src="/images/troubleshooting/nat/natg-ping-output.png" alt="Ping output" shadow={true} width={400} />

**To run a traceroute test**

Traceroute is available only on NAT Gateway with at least one active VXC connection.

1. Log in to the <Link href="https://portal.megaport.com">Megaport Portal</Link> and choose **Services**.

2. Click the Service Diagnostics icon or the Looking Glass icon.
   <Image src="/images/troubleshooting/nat/natg-service-diagnostics-looking-glass-icons.png" alt="Service diagnostics icon" shadow={true} width={980} />

3. Click the **Traceroute** tab.
   <Image src="/images/troubleshooting/nat/natg-traceroute.png" alt="Traceroute tab" shadow={true} width={400} />

4. Type the destination IP into the **Destination IP** field, then click **Run Traceroute**.\
   Packet routing and transit delay results are returned.

   <Image src="/images/troubleshooting/nat/natg-traceroute-output.png" alt="Traceroute output" shadow={true} width={400} />

### Ping and traceroute specifications

Ping and traceroute tests from a NAT Gateway are subject to certain limits and specifications. For more information, see  [Megaport NAT Gateway (NAT Gateway)](/limits-quotas#nat-gateway).

## Next steps

If the troubleshooting actions do not resolve your issue, contact support. Before contacting support for assistance, collect the following information.

* **Troubleshooting results** -- Provide all troubleshooting steps taken in detail.

* **General details** -- The date, time, and time zone in which the issue started.

* **Loopback details** -- If you placed loopbacks, note their location and direction.

* **Interface and BGP configurations on the customer device/Cloud Service Provider side**
  * Provide the interface settings, including the VLAN number.
  * Provide any static routes and routing protocol configurations (EIGRP/OSPF/BGP).
  * Provide the BGP ASN.
  * Provide all firewall rules and ACL configurations for the data flow experiencing the issue.

* **Source and destination IP addresses**
  * Provide the **IP packet** field containing the IP address of the originating device.
  * Provide the **IP packet** field containing the IP address of the destination device.

* **High-level network diagram** -- Understanding how your network design is implemented and the connection into the Megaport network helps identify additional focus areas within the troubleshooting process. Provide a network diagram that includes all devices in the path; note each device’s involved IP addresses and VLANs.

* **Ping test results** -- Provide the output of each **ping** test performed on the service. Provide output tests for all services related to different products (Port, VXC, NAT Gateway).

* **Traceroute test results** -- Provide **traceroute** results indicating which side of the connection initiated the test and which side was the destination. We recommend using the A-End and B-End information from your VXC.

<Note>
  For more information about when a field service technician is needed onsite at the data center, see [Customer Field Services](/finance/customer-field-services).
</Note>
