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

# Using Encryption in Transit with Megaport Services

> This help topic describes how to use encryption with Megaport services

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

**Encryption in transit** refers to protecting data while it moves from one place to another.

There are many options available for encrypting data as it moves over a network. The most common are <Gloss term="MACsec" anchor="macsec" />, <Gloss term="IPsec" anchor="ipsec" />, and host-level encryption. Each of these approaches has its advantages and disadvantages, and each operates at a different level of the network stack.

Using the [OSI Model](https://en.wikipedia.org/wiki/OSI_model), MACsec operates at <Gloss term="Layer 2" anchor="layer2" />, IPsec operates at <Gloss term="Layer 3" anchor="layer3" />, and host level, including TLS and SSH, typically operates at Layers 4-7 within the clients and servers rather than at the network level.

Megaport works with customers using various combinations of all of these protocols, along with many others.

<Image src="/images/encryption/encryption-services.png" alt="Transit Host Encryption " shadow={true} width={700} />

For more information about using MACsec with your Megaport services, see [Using MACsec with Megaport](/encryption/macsec).

For more information about using IPsec with your Megaport services, see [Using IPsec with Megaport](/encryption/ipsec).

## Helpful references

* [Comparing Encryption in Transit Options](https://www.megaport.com/blog/comparing-encryption-in-transit-options/)
* [Enabling Cloud-Native VPN/Encryption Options Over Dedicated Cloud Connectivity Paths](/encryption/cloud-native-vpn-encryption)
* [Using IPsec with Megaport](/encryption/ipsec)
* [Using MACsec with Megaport](/encryption/macsec)
