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

# Configuring Static Routing on a Megaport NAT Gateway

> This help topic describes how to configure static routing on a Megaport NAT Gateway.

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

Static routes establish reachability to peers in place of BGP connections that provide dynamic routing. You configure static routes to provide connectivity to a customer device that doesn't support BGP or to a target device that requires manually configured addressing and routes. With static routes, you need to manually update the route when there are any topology changes.

A NAT Gateway supports up to 100 static routes.

**To add a static route**

1. In the <Link href="https://portal.megaport.com">Megaport Portal</Link>, go to the **Services** page.
2. Select the VXC and select the NAT Gateway A-End.
3. In the NAT Gateway Connection detail page, under Static Routes, specify the IPv4 or IPv6 destination network address in CIDR notation.
4. Specify the IPv4 or IPv6 address of the next-hop router.\
   The address must be in the same subnet as the interface but it cannot match the interface IP address.
5. (Optional) In the **Description** field, include any notes that will help identify this static route.\
   The description range is from 1 to 100 characters.
6. Click **Next**.
7. Update the NAT Gateway B-End, if necessary.
8. Click **Next**.
9. Click **Update**.

## Helpful references

* [Configuring a NAT Gateway VXC](/nat/configuring-nat-vxc)
* [Configuring BGP for Megaport NAT Gateway](/nat/configure-bgp)
* [Creating a NAT Gateway VXC](/nat/nat-gateway-vxc)
