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

# Megaport NAT Gateway Route Summarization

> This help topic describes how to achieve route summarization-like behavior on a Megaport NAT Gateway.

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

This topic describes how to achieve a similar outcome to route summarization on NAT Gateway using a combination of static routes and filtering. This helps you avoid exceeding CSP limits when advertising routes.

This image shows how route summarization can be configured, with the customer-facing VXC originating several prefixes when you want to advertise only a summary route to the CSP.

<Image src="/images/nat/nat-route-summary.png" alt="Diagram showing several prefixes originating from the customer site, summarized to a single route in the VXC to the NAT Gateway" width={800} />

If you configure a static <Gloss term="supernet" anchor="supernet" /> on the VXC facing the source of the smaller networks, the NAT Gateway also advertises the supernet to the CSP. You can then use prefix filters to prevent the NAT Gateway from advertising the specifics to the CSP, which achieves approximately the same behavior as route summarization.

## Helpful references

* [Configuring BGP for Megaport NAT Gateway](/nat/configure-bgp)
* [Creating a NAT Gateway VXC](/nat/nat-gateway-vxc)
* [Filtering by BGP prefix](/nat/bgp-prefix-filtering#bgpprefixfilter)
* [Introduction to Route Summarization](https://networklessons.com/rip/introduction-route-summarization)
* [Megaport NAT Gateway Route Filtering](/nat/route-filtering)
* [Route Summarization](https://networklessons.com/subnetting/route-summarization)
