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

# Linking and Unlinking Megaport Internet Connections

> This help topic describes how to link and unlink Megaport Internet connections to an IP Address block in the Megaport Portal.

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

You can link an IP Address block to one or more Megaport Internet connections in the same metro. A block can be linked to multiple connections, and a connection can have multiple blocks linked to it.

Only live Megaport Internet connections in the same metro as the block are eligible for linking. You can link or unlink a connection from either the IP Address block or the Megaport Internet connection. Both methods produce the same result.

<Warning>
  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.
</Warning>

## Linking from an IP Address block

Use the **Configuration** tab of the block to select the Megaport Internet connections that you want to link.

**To link from an IP Address block**

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

2. Click the **Configuration** tab.

   <Image src="/images/ip-address/ip-address-configuration-tab.png" alt="Configuration tab for an IP Address block, showing the Link Internet VXCs checklist" shadow={true} width={900} />

3. Under **Link Internet VXCs**, select the check box next to each connection you want to link. Only connections in the same metro as the block are available for selection.

   <Image src="/images/ip-address/ip-address-link-checkbox-selected.png" alt="Link Internet VXCs checklist with a connection checkbox selected" shadow={true} width={900} />

4. Click **Save linked VXCs**.

   The **Linked VXCs** tab shows each linked connection as a topology diagram, including the VLANs, speed, and diversity zone on each end.

   <Image src="/images/ip-address/ip-address-linked-vxcs-topology.png" alt="Linked VXCs tab showing a linked connection as a topology diagram between an MCR and a Megaport Internet VXC" shadow={true} width={900} />

## Linking from a Megaport Internet connection

Use the **Megaport Internet** tab of the connection to select the IP Address blocks that you want to link.

**To link from a Megaport Internet connection**

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

2. Click the **Megaport Internet** tab in the Connection Details page.

   <Image src="/images/ip-address/megaport-internet-ip-addresses.png" alt="IP Addresses section of the Megaport Internet tab in Connection Details, showing eligible blocks listed by prefix" shadow={true} width={400} />

3. Under **IP Addresses**, select the check box next to each block you want to link. Blocks are listed by their prefix, not by name, and only blocks in the same metro as the connection are available for selection.

   If you do not have an existing block in the metro, click **Request IP Address** to order a new one. For more information, see [Creating an IP Address Block](/ip-address/creating-ip-address).

4. Click **Link IP Address**.

<Note>
  The **Configuration** tab lists available connections by name, while the **Megaport Internet** tab lists available IP Address blocks by prefix.
</Note>

## Unlinking an IP Address block

You can also unlink an IP Address block from a Megaport Internet connection.

* **From the block** -- In the **Services** page, click the IP Address block you want to update, then click the **Configuration** tab. Clear the check box next to the connection, then click **Save linked VXCs**.

  <Image src="/images/ip-address/ip-address-unlink-checkbox.png" alt="Link Internet VXCs checklist with a linked connection checkbox selected, ready to be cleared to unlink it" shadow={true} width={900} />

* **From the connection** -- In the **Services** page, click the Megaport Internet connection, then click the **Megaport Internet** tab. Under **IP Addresses**, click **Unlink** next to the block.

  <Image src="/images/ip-address/megaport-internet-unlink-button.png" alt="IP Addresses section of the Megaport Internet tab, showing a linked block with an Unlink button" shadow={true} width={400} />

Changes apply immediately after saving. Unlinking a connection does not delete the IP Address block or the connection, it only removes the association between them.

## Helpful references

* [Creating an IP Address Block](/ip-address/creating-ip-address)
* [IP Address Overview](/ip-address)
* [Megaport Internet Overview](/megaport-internet)
