> ## 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 Internet Routing Guide

> This help topic describes how to configure BGP routing for a Megaport Internet connection.

export const Anchor = ({name}) => {
  const errorPrefix = '\x1b[31;1;4mERROR\x1b[0m: Anchor -';
  if (name === undefined || name === null || name === 'undefined') {
    console.error(`${errorPrefix} \`name\` must have a value — rendering an empty string instead`);
    return <></>;
  }
  const raw = typeof name === 'string' ? name : JSON.stringify(name);
  const id = raw.replace(/\s+/g, '-').replace(/[^A-Za-z0-9_-]/g, '').replace(/-+/g, '-').replace(/^-+|-+$/g, '');
  if (!id) {
    console.error(`${errorPrefix} \`name\` "${name}" sanitizes to an empty id — rendering an empty string instead`);
    return <></>;
  }
  return <a style={{
    scrollMarginTop: 'var(--scroll-mt)'
  }} id={id}></a>;
};

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

This topic describes standard Megaport Internet configuration and how you can configure <Gloss term="Border Gateway Protocol (BGP)" anchor="bgp" /> on Megaport Internet connections.

<Gloss term="Megaport Internet" anchor="mega-internet" /> is available for <Gloss term="Ports" anchor="port" />, <Gloss term="MCRs" anchor="mcr" />, and <Gloss term="MVEs" anchor="mve" /> in selected countries. For the latest information on Megaport Internet availability, see [Locations available](/megaport-internet#locations). You can access the product by ordering a Megaport Internet connection to a Megaport internet router.

Multiple diversity zones are available in all metros where Megaport Internet is available. For maximum resiliency, connect to both zones by matching red to red and blue to blue. Additional resiliency is available by connecting to Megaport Internet in an additional nearby metro. For more information, see [Port Diversity](/connections/port-diversity), [MCR Diversity](/mcr/mcr-mve-diversity), and [MVE Diversity](/mve/mcr-mve-diversity).

All Megaport Internet connections are assigned IPv4 and IPv6 addresses as standard and configured as follows:

* /31 Point-to-point IPv4 network

* /64 Point-to-point IPv6 network

* <Gloss term="DHCP" anchor="dhcp" /> is enabled for IPv4 and will permanently offer the same static IPv4 address.

* IPv6 router advertisements are enabled for SLAAC-capable IPv6 clients.

* It is not required to use the dynamic address assignment methods. The address information is also available in the Megaport Portal and you can configure your equipment with static addresses from the assigned range.

* Megaport adheres to [BCP 38](https://www.rfc-editor.org/rfc/rfc2827.txt). Packets sent to Megaport must have a valid source address in the assigned IPv4 or IPv6 ranges.

* To protect against abuse of Megaport IP address space for the sending of spam, Megaport filters outgoing connections to TCP port 25 when the source address is a Megaport-owned IP address. Customer-supplied address space is not filtered. Exceptions for specific IP addresses can be made upon request, with valid justification.

<Anchor name="IPaddress" />

## Requesting additional IP addresses

After your Megaport Internet connection is live, you can request additional IP addresses. There is a charge for additional IP addresses. The request for a public IP address is added to the Megaport Internet connection. Megaport Customer Support will review the additional IP address request within 48 hours of submission.

Public IP address requests have the following restrictions:

* They must be ordered for a term of 12 months or more.

* The Megaport service (Port, MVE, MCR) must also be ordered for a term of 12 months or more.

* Megaport-assigned IP address space must be advertised only on Megaport Internet services. Advertising these networks to other Megaport services or third party providers is forbidden.

<Note>
  You must have at least Technical Admin privileges to perform this action. For more information, see [Managing User Roles](/portal-admin/user-management/roles).
</Note>

**To request a public IP address for a Megaport Internet connection**

Add the IP address request to the Megaport Internet connection after it has been configured or is live.

1. In the <Link href="https://portal.megaport.com">Megaport Portal</Link>, go to the **Services** page and find the Megaport Internet connection that you want to update.

2. Click the gear icon next to the connection.

   <Image src="/images/megaport-internet/gear-icon.png" alt="This image shows the gear icon on the Megaport Internet connection" shadow={true} />

3. Click **Megaport Internet**.

   <Note>
     The image below shows the edit Connection Details page for a Megaport Internet connection on a Port. For a Megaport Internet connection on an MCR, the Megaport Internet entry will be in a different position.
   </Note>

   <Image src="/images/megaport-internet/mport-inter-ip.png" alt="This image shows where to click Megaport Internet " shadow={true} />

4. Click **Request Public IP Addresses**.

   <Image src="/images/megaport-internet/mport-inter-ip-config.png" alt="This image shows the fields and important information used when requesting a public IP address. g " shadow={true} />

5. Enter these details:

   * **Subnet Size** -- Select the size from the drop-down list.\
     The monthly rate will appear under the **Subnet Size** field when you have chosen a subnet size.

   * **Projected IP Usage Duration** -- Select the duration from the drop-down list. The duration must be at least 12 months. This information is collected by the Regional Internet Registry (RIR) for it to plan efficient use of resources.

   * **Purpose** -- Enter a description of the intended purpose of the allocated subnet.\
     This information is also collected by the RIR for it to plan efficient use of resources.

   * **Additional Remarks** -- Enter any additional information that further explains the request.

6. Read the **Important Information** on this page.

   <Note>
     Read the **Important Information** carefully, as accepting the terms results in a legal agreement.
   </Note>

7. Click **Request Public IP Addresses** to accept the conditions, and submit your request for additional public IP addresses.\
   A window will appear confirming that your request has been accepted. You will also receive a confirmation email with the details of your request. The request will be processed within 48 hours.

8. Click **OK**.

Megaport Customer Support will review the additional IP address request within 48 hours of submission. When your request has been processed, you will receive an email to your company account confirming the subnet size and cost, and explaining the next steps in the process.

<Anchor name="enableBGP" />

## Enabling BGP

You can request BGP on new and existing Megaport Internet VXCs. With BGP enabled:

* Customers might advertise Megaport assigned IP blocks or their own provider independent IP addresses (see [BGP filtering](#bgp-filtering)).

* Megaport configures an IPv4 and IPv6 BGP neighbor.

* Megaport uses the first IP address and configures the BGP neighbor as the second IP address in the point-to-point network.

* You can optionally provide a BGP password.

* Source address filtering permits only Megaport-assigned IP addresses and prefixes that customers have provided for advertisement over BGP.

* Megaport sets a minimum BGP hold timer of 20 seconds. A BGP connection will not establish if you configure a value lower than this on your router.

<Note>
  <Gloss term="BFD" anchor="bfd" /> is not currently supported with Megaport Internet.
</Note>

### Requesting BGP on Megaport Internet connections

You can enable BGP configuration details on a Megaport Internet connection when it is live. To add BGP details, edit the Megaport Internet connection and provide the BGP details.
To configure BGP for your Megaport Internet connection, you must provide these details:

* Customer <Gloss term="ASN" anchor="asn" />

* BGP Password (optional) -- You can add a password for your BGP entry, or you can leave this field blank.

* Prefixes (optional) -- A list of publicly assigned IPv4 or IPv6 networks to be advertised.

* AS-SET -- A list of ASNs used to define routing policies and filter prefixes from multiple ASNs.

BGP requests will be reviewed by Megaport Customer Support before being implemented.

**To request BGP settings on a Megaport Internet connection**

The BGP settings can be added to the Megaport Internet connection when the service has been provisioned.

<Note>
  You must have at least Technical Admin privileges to perform this action. For more information, see [Managing User Roles](/portal-admin/user-management/roles).
</Note>

1. In the <Link href="https://portal.megaport.com">Megaport Portal</Link>, go to the **Services** page and find the Megaport Internet connection that you want to update.

2. Click the gear icon next to the connection.

   <Image src="/images/megaport-internet/gear-icon.png" alt="This image shows the gear icon on the Megaport Internet connection" shadow={true} />

3. Click **Megaport Internet**.

   <Note>
     The image below shows the edit Connection Details page for a Megaport Internet connection on a Port. For a Megaport Internet connection on an MCR, the Megaport Internet entry will be in a different position.
   </Note>

   <Image src="/images/megaport-internet/mport-inter-bgp.png" alt="This image shows where to click Megaport Internet " shadow={true} />

4. Click **Update BGP Connection**.

   <Image src="/images/megaport-internet/update-bgp.png" alt="This image shows where to click Megaport Internet " shadow={true} />

5. Enter these details:

   * **Customer ASN**
     * Must be a valid public or private BGP ASN.
     * Mandatory if entering BGP details.
     * For more information, see [Using private AS numbers](#privateasn).

   * **BGP Password** (optional)
     * The allowed password length is from 1 to 25 characters.
     * The password can include any of these characters:
       * a-z
       * A-Z
       * 0-9
       * ! @ # . \$ % ^ & \* + = - \_

   * **Route Table**
     * Select your routing preference from the drop-down list.
     * Ensure that valid route objects are created in the appropriate Regional Internet Registry (RIR) or Routing Assets Database (RADb) for all advertised networks.
     * Your selection determines how routes are advertised.
     * Each option advertises an increasing number of routes.
     * For more information, see [Advertised routes](#advertisedroutes).

   * **Prefixes** (optional)
     * A list of publicly assigned IPv4 or IPv6 networks to be advertised
     * The list must be entered as a comma-separated list.\
       For example, 192.0.2.0/24, 192.0.2.0/30.
     * For more information, see [BGP filtering](#BGPfiltering).

   * **AS-SET** (optional)
     * A list of ASNs used to define routing policies and filter prefixes from multiple ASNs.
     * Multiline input required.
     * Entries must be separated by a comma.

   * **Additional Remarks** (optional)
     * Add any additional information or justification.

6. Click **Update BGP Connection** to submit your changes.

Megaport Customer Support will review the request. If everything is in order, you will receive an email with the next-step instructions.

If there are any issues with the request, Megaport Customer Support will contact you.

<Anchor name="BGPfiltering" />

## BGP filtering

You can optionally provide a list of IPv4 and IPv6 prefixes that you want to advertise.

* Prefixes must be publicly assigned addresses and owned by the customer, or the customer must provide an LOA from the owner authorizing their use.

* Prefix length must be between /12 and /24 for IPv4 prefixes.

* Prefix length must be between /24 and /48 for IPv6 prefixes.

Megaport will filter out any advertised prefixes not listed.

Megaport performs <Gloss term="RPKI" anchor="rpki" /> filtering. Invalid routes are filtered. For more information, see [RPKI](https://www.ripe.net/manage-ips-and-asns/resource-management/rpki/).

Megaport automatically permits longer prefixes down to /32 for IPv4 and /128 for IPv6 in our filters. This allows you to share a single /24 (IPv4) or /48 (IPv6) route across multiple Megaport Internet services within the same metro area.

Prefixes longer than /24 and /48 are not exported to external neighbors.

The maximum number of BGP prefixes accepted is 4x the number of registered prefixes to allow for limited traffic engineering using more specific routes.

Megaport will not install routes from transit or peering sources that fall within a customer’s advertised prefixes. All traffic destined for addresses within a customer’s advertised prefix range will be routed via the customer’s Megaport Internet service, even if a more specific route exists via an external path.

Megaport sets a high local-preference on customer BGP routes.

Route objects must be created with the relevant Regional Internet Registry (RIR) or Routing Assets Database (RADb) for all networks, regardless of whether the network uses private or public ASNs. For statically routed networks or private ASNs, route objects must specify the origin of **AS49915**.

<Note>
  Upstream filters can take up to 48 hours to update after the service has been configured. During this period, newly created or modified routes might not propagate to the internet completely.
</Note>

<Anchor name="advertisedroutes" />

## Advertised routes

You can choose from four options, with an increasing number of routes. If you do not specify your preferred option, Megaport will only advertise a default route.

<Note>
  Megaport always advertises a default route with all routing options.
</Note>

Routing options:

* **Default Route** -- A locally originated default route (one route).

* **Customer Routers** -- In addition to the above, this includes the routes of Megaport customers.

* **Customer and Peer Routes** -- In addition to the above, this includes the routes of Megaport peers.

* **Full Routes** -- In addition to the above, this includes a complete internet routing table (>900,000 routes).

Megaport internal communities and private communities are removed from outbound route announcements.

## Traffic engineering communities

You can set these communities to influence the advertisement of your routes to other neighbors.\
TE communities are stripped on egress.

| Large Community | Standard Community | Action                                                                |
| --------------- | ------------------ | --------------------------------------------------------------------- |
| 49915:65000:0   | 65000:0            | Do not export                                                         |
| 49915:65000:ASN | 65000:ASN          | Do not export to ASN                                                  |
| 49915:65001:0   | 65001:0            | Prepend once                                                          |
| 49915:65001:ASN | 65001:ASN          | Prepend once to ASN                                                   |
| 49915:65002:0   | 65002:0            | Prepend twice                                                         |
| 49915:65002:ASN | 65002:ASN          | Prepend twice to ASN                                                  |
| 49915:65003:0   | 65003:0            | Prepend three times                                                   |
| 49915:65003:ASN | 65003:ASN          | Prepend three times to ASN                                            |
|                 | 65535:65284        | nopeer <br /> Do not advertise to any bilateral or route-server peers |

<Anchor name="remote-triggered-black-hole" />

## Remote Triggered Black Hole

<Gloss term="Remote Triggered Black Hole (RTBH)" anchor="rtbh" /> allows you to drop traffic to a host under attack at the Megaport edge, before it reaches your Megaport Internet connection.

Announce a host route tagged with one of these communities from the device that BGP peers with Megaport, such as your own router or firewall. Megaport discards traffic to that address, so you do not need to configure a black hole route on your network. Withdraw the announcement to restore normal forwarding. You do not need to take any action in the Megaport Portal to activate or withdraw a black hole route.

| Community | Action                               |
| --------- | ------------------------------------ |
| 49915:666 | Black hole the announced host route. |
| 65535:666 | Black hole the announced host route. |

Megaport accepts a black hole announcement only when:

* The route has a /32 (IPv4) or /128 (IPv6) prefix.
* The route is contained within a prefix you are already authorized to advertise on the connection (see [BGP filtering](#BGPfiltering)).

Accepted black hole routes count toward the maximum number of BGP prefixes accepted on your connection (see [BGP filtering](#BGPfiltering)).

For more information about black hole communities, see [RFC 7999 - BLACKHOLE Community](https://www.rfc-editor.org/rfc/rfc7999.html).

<Anchor name="privateasn" />

## Using private AS numbers

Megaport supports BGP for customers that do not have a public AS number, using private AS numbers.

You can choose your ASN from either the 2-byte or 4-byte private ranges.

All routes Megaport advertises upstream will have private AS numbers stripped from the AS path. This might result in Megaport appearing to be the origin of the prefix. If the network owner has published RPKI ROA records, you might need to create additional ROAs permitting Megaport AS49915 to advertise the route.

## Helpful references

* [Contacting Support](/support/contact)
* [Creating a Megaport Internet Connection for a Port](/megaport-internet/port)
* [Creating a Megaport Internet Connection for an MCR](/megaport-internet/mcr)
* [Creating a Megaport Internet Connection for an MVE](/megaport-internet/mve)
* [Creating a Megaport Internet Connection for a NAT Gateway](/megaport-internet/nat-gateway)
* [Creating a Megaport Internet Connection from a Port with the API](/api/api-mic)
* [MCR Diversity](/mcr/mcr-mve-diversity)
* [Monitoring Ports, VXCs, Megaport Internet, and IXs](/monitoring/port-vxc-monitoring)
* [MVE Diversity](/mve/mcr-mve-diversity)
* [Port Diversity](/connections/port-diversity)
* [Terminating a Megaport Internet Connection](/megaport-internet/terminating-connection)
* [Troubleshooting Megaport Internet Connectivity](/troubleshooting/mic/megaport-internet)
