# Exoscale Documentation — EIP

> Elastic IPs (EIPs): static IP addresses that can be attached to one or more Compute instances in the same zone.

---

url: https://community.exoscale.com/product/networking/eip/

---

# EIP

- [Quick Start - Elastic IP](https://community.exoscale.com/product/networking/eip/quick-start/index.md) - Get started quickly with a guided setup to achieve your first successful use of the service, including the required steps and configuration.
- [Overview - Elastic IP](https://community.exoscale.com/product/networking/eip/overview/index.md) - Terminology and key features at a glance, learn the core concepts, capabilities, and options of this service before you dive deeper.
- [How-To - Elastic IP](https://community.exoscale.com/product/networking/eip/how-to/index.md) - Step-by-step guides to configure the service and use specific features, with clear instructions for common tasks and problem solving.
- [Service Boundaries - Elastic IP](https://community.exoscale.com/product/networking/eip/service-boundaries/index.md) - Service boundaries: quotas, limits, and the guaranteed service levels (SLA) for this product, including key constraints to plan and operate reliably.
- [Reference - Elastic IP](https://community.exoscale.com/product/networking/eip/reference/index.md) - Reference documentation for API, CLI, and tools, browse comprehensive details, parameters, commands, and integration notes.

---

url: https://community.exoscale.com/product/networking/eip/quick-start/

---

# Quick Start - Elastic IP



## Creating an Elastic IP
You can create an Elastic IP through the [Portal](https://portal.exoscale.com/), the [CLI](https://github.com/exoscale/cli) or
the [API](https://community.exoscale.com/reference/api/compute/elastic-ip/index.md#list-elastic-ips).


This is an example from the CLI:

__`exo compute elastic-ip create ...`__

Create a manual Elastic IP:

```bash
exo compute elastic-ip create --zone de-fra-1
```

Output:

```bash
 ✔ Creating Elastic IP... 3s
┼─────────────┼──────────────────────────────────────┼
│ ELASTIC IP  │                                      │
┼─────────────┼──────────────────────────────────────┼
│ ID          │ 5a5aed48-7a46-442a-8456-0a15d931fd0b │
│ IP Address  │ 203.0.113.202                        │
│ Description │                                      │
│ Zone        │ de-fra-1                             │
│ Type        │ manual                               │
┼─────────────┼──────────────────────────────────────┼
```

Create a managed Elastic IP:

```bash
exo compute elastic-ip create  \
  --zone de-fra-1                \
  --healthcheck-interval 60      \
  --healthcheck-mode tcp         \
  --healthcheck-port 80          \
  --healthcheck-strikes-fail 5   \
  --healthcheck-strikes-ok 5     \
  --healthcheck-timeout 10
```

Output:

```bash
 ✔ Creating Elastic IP... 3s
┼──────────────────────────┼──────────────────────────────────────┼
│        ELASTIC IP        │                                      │
┼──────────────────────────┼──────────────────────────────────────┼
│ ID                       │ 868d029d-b1a2-4fd3-9006-4b98998240b4 │
│ IP Address               │ 203.0.113.203                        │
│ Description              │                                      │
│ Zone                     │ de-fra-1                             │
│ Type                     │ managed                              │
│ Healthcheck Mode         │ tcp                                  │
│ Healthcheck Port         │ 80                                   │
│ Healthcheck Interval     │ 1m0s                                 │
│ Healthcheck Timeout      │ 10s                                  │
│ Healthcheck Strikes OK   │ 5                                    │
│ Healthcheck Strikes Fail │ 5                                    │
┼──────────────────────────┼──────────────────────────────────────┼
```

Note that in order to create a managed Elastic IP, you have to provide health
check parameters. Without those parameters, the Elastic IP is created as manual
management type.

## Attaching an Elastic IP
Once the Elastic IP address as been created, you can attach it to one or more
Compute instances. Here is another example from the CLI:

__`exo compute instance elastic-ip attach ...`__

```bash
exo compute instance elastic-ip attach my-instance 203.0.113.202
```

Output:

```bash
 ✔ Attaching Elastic IP "203.0.113.202" to instance "my-instance"... 3s
┼──────────────────────┼──────────────────────────────────────┼
│   COMPUTE INSTANCE   │                                      │
┼──────────────────────┼──────────────────────────────────────┼
│ ID                   │ 0e713d4c-9f3f-4a9a-b958-b4571450d3a8 │
│ Name                 │ my-instance                          │
│ Creation Date        │ 2019-03-08 15:07:14 +0000 UTC        │
│ Instance Type        │ standard.tiny                        │
│ Template             │ Linux Ubuntu 18.04 LTS 64-bit        │
│ Zone                 │ ch-gva-2                             │
│ Anti-Affinity Groups │ n/a                                  │
│ Security Groups      │ default                              │
│ Private Networks     │ n/a                                  │
│ Elastic IPs          │ 203.0.113.202                        │
│ IP Address           │ 203.0.113.20                         │
│ IPv6 Address         │ 2001:db8:e00:588:4fe:9cef:fe00:23f   │
│ SSH Key              │ admin                                │
│ Disk Size            │ 10 GiB                               │
│ State                │ running                              │
│ Labels               │ n/a                                  │
┼──────────────────────┼──────────────────────────────────────┼
```

The Elastic IP is now routing traffic to `my-instance`.

After an Elastic IP is attached to an instance, a managed Elastic IP does not
require explicitly configuring an extra network interface on the instance.
However, a manual Elastic IP requires some
[further configuration](https://community.exoscale.com/product/networking/eip/how-to/index.md#configure-a-manual-elastic-ip-on-an-instance).

---

url: https://community.exoscale.com/product/networking/eip/overview/

---

# Overview - Elastic IP



Exoscale Elastic IPs (EIPs) provide static IP addresses that can be
persistently attached to multiple Compute instances within the same zone,
allowing seamless transition and consistent IP configurations across different
instances.


## Elastic IP Types
* __Manual Elastic IPs__
* __Managed Elastic IPs__

### Basic Behavior of Elastic IPs (EIPs)
Creation and Availability
: Elastic IPs are created for your organization. They remain available until
  you decide to delete them.

Attachment and Zone Binding
: Elastic IPs can be attached to one or multiple instances at any time, but can
  only be attached to Compute instances within the same zone.

Traffic Characteristics
: All incoming traffic towards an Elastic IP is redirected to the attached
  instances. All outgoing traffic is sent by the internal IP address attached
  to the instance. It **will not** appear as coming from the Elastic IP. When
  multiple instances are attached to an Elastic IP, traffic is distributed
  among them with **no guarantee of even load distribution**.

### Customizable Behavior
Both manual and managed Elastic IPs have distinct characteristics, their
behavior can be customized further based on requirements. Distinct
Characteristics of Manual and Managed Elastic IPs are:



## Manual Elastic IPs
Configuration
: Manual Elastic IPs need to be manually enabled on the instance, this type
  offers more flexibility but requires more manual configuration.

Traffic Perception
: Internally, instances attached to a manual Elastic IP see traffic as coming
  directly to the Elastic IP address, this is different from managed Elastic
  IPs, where incoming traffic is seen as coming to the native IP address of the
  attached instance.

Outgoing Traffic
: Outgoing traffic can originate from the manual Elastic IP, allowing the
  instance to use it as a traffic source, albeit with some limitations.


## Managed Elastic IPs
Configuration
: Managed Elastic IPs do not require manual action on your part for the
  instance itself. Once attached, a managed Elastic IP transparently routes
  traffic to the instance.

Traffic Routing
: Includes basic health check capabilities, ensuring traffic is routed only to
  healthy instances.

Traffic Perception
: Instances see incoming traffic as if it's from the native IP address, making
  it impossible to differentiate traffic based on the target IP.

Outgoing Traffic
: Outgoing traffic will always appear from the native IP address, unlike manual
  Elastic IPs.


## Elastic IPv6 Prefix
Exoscale Compute instances can optionally be assigned a public IPv6 address either during creation or afterward. This IPv6 address is partially derived from the instance's unique MAC address, making it intrinsically tied to the instance. Therefore, when an instance is destroyed, its public IPv6 address is permanently released.

In scenarios where a persistent IPv6 address is desirable, such as employing multiple IPv6 addresses for a single use case, an Elastic IPv6 prefix can be used. The Elastic IPv6 prefix is a Compute resource that provides your organization with an entire IPv6 prefix (with prefix length /96), which can be attached to one or several instances in addition to their primary IPv6 address.

To utilize these prefixes, instances must have
[IPv6 enabled](https://community.exoscale.com/product/networking/ip/overview/index.md#adding-ipv6-to-new-instance).
Your organization can attach multiple Elastic IPv6 prefixes as needed. Unlike its IPv4 counterpart, an Elastic IPv6 prefix contains over 4 billion addresses, providing ample resources to cater to your instances’ networking requirements.


## Terminology
Native IP Address
: The primary IP address automatically assigned to a Compute instance. It is
  distinct from any Elastic or additional IPv6 addresses that might be
  assigned.

Elastic IP
: A static public IP address that an organization can attach to one or multiple
  Compute instances in addition to their native IP addresses. Elastic IP
  addresses are created for the organization and remain available until they
  are explicitly deleted.

Manual Elastic IP
: A type of Elastic IP that requires manual configuration on Compute instances.
  It provides more flexibility, allowing traffic to originate from the manual
  Elastic IP address if configured correctly.

Managed Elastic IP
: A type of Elastic IP that does not require manual configuration. When
  attached, it automatically routes traffic to Compute instances.

Elastic IPv6 Prefix
: A Compute resource providing an entire IPv6 prefix (with a prefix length of
  /96) that can be assigned to one or several instances. It offers multiple
  IPv6 addresses for use within an organization.

Traffic Distribution
: The process by which incoming traffic is distributed among multiple instances
  attached to a single Elastic IP. There is no guarantee of even load
  distribution across instances.

Zone
: A specific geographical location where Exoscale infrastructure is available.
  Compute instances and Elastic IPs are bound to a certain zone, meaning
  resources must be within the same zone to be attached to each other.


## Features
All Exoscale instances are provisioned with a native IPv4 address, leased from
a global pool and intrinsically tied to the Compute instance. However, upon
instance termination, the IP address is released back to the pool with no
guarantee of reacquisition.

Elastic IPs
: Ensure continuity with Elastic IPs, designed for persistent address
  allocation across instances. Elastic IPs supplement native addresses and can
  attach to multiple instances simultaneously.

Persistent Usage
: Achieve IP persistence through Elastic IPs, mitigating address changes upon
  instance destruction. Seamlessly reroute traffic with an Elastic IP when
  transitioning between underlying instances.

Multi-IP Scenarios
: Elastic IPs address complex requirements like multi-TLS certificate usage or
  running numerous service instances on a single machine.

> [!NOTE]
> Leverage Elastic IPs for operational continuity and flexibility across your network architecture.

---

url: https://community.exoscale.com/product/networking/eip/how-to/

---

# How-To - Elastic IP

Step-by-step guides to configure the service and use specific features, with clear instructions for common tasks and problem solving.

- [Configure IPv6 Addresses](https://community.exoscale.com/product/networking/eip/how-to/configure-ipv6/index.md) - Configure additional IPv6 addresses on Exoscale instances for managed or manual Elastic IPv6 prefixes using Ubuntu or Debian network setup.
- [Configure a Manual Elastic IP](https://community.exoscale.com/product/networking/eip/how-to/configure-manual-eip/index.md) - Configure a manual Elastic IP on Exoscale instances with OS-specific steps for Linux, OpenBSD, and Windows to receive routed traffic.
- [Create an Elastic IPv6 Prefix](https://community.exoscale.com/product/networking/eip/how-to/creating-eipv6-prefix/index.md) - Create manual or managed Elastic IPv6 prefixes on Exoscale using the Portal, CLI, or API, with optional health checks for managed routing.
- [Attach an Elastic IPv6 Prefix](https://community.exoscale.com/product/networking/eip/how-to/attach-eipv6-prefix/index.md) - Attach an Elastic IPv6 prefix to Exoscale instances to route prefix traffic, with support for manual or managed IPv6 configuration.
- [Use Elastic IP as Traffic Source](https://community.exoscale.com/product/networking/eip/how-to/manual-eip-trafficsource/index.md) - Use a manual Elastic IP as the source for outbound traffic by binding apps or setting preferred IPv6 source routing on your instance.
- [Configure Elastic IP Health Checks](https://community.exoscale.com/product/networking/eip/how-to/managed-eip-healthcheck/index.md) - Configure managed Elastic IP health checks with TCP or HTTP probes, intervals, timeouts, and thresholds to route traffic to healthy instances.

---

url: https://community.exoscale.com/product/networking/eip/how-to/configure-ipv6/

---

# Configure IPv6 Addresses

As we described, for managed Elastic IPv6 prefix a single reference IPv6 address will be transparently forwarded to
the attached instances without any configuration needed. For all the other cases, manual configuration is needed within the Compute instances.

Some common use cases are:

- To employ a managed Elastic IPv6 prefix, and you need to use more IPv6 addresses than the reference address.
- To employ a manual Elastic IPv6 prefix.

> [!WARNING]
> **Do not remove the original IPv6 address** of the compute instance, as Elastic IPv6 relies on it.

Configuration of additional IPv6 addresses within your compute instance may vary depending the operating system.
Some examples follow:

### Ubuntu 
Ubuntu 22.04.5 LTS (Jammy Jellyfish)

In `/etc/netplan/51-eip.yaml`, put the following snippet.

```yaml
---
network:
  version: 2
  renderer: networkd
  ethernets:
    lo:
      match:
        name: lo
      addresses:
        - 2a04:c45:c00:3a46:500:2::1337/128
```

And then, apply it with `sudo netplan apply`

### Debian
Debian 11 (Bullseye)

In `/etc/network/interfaces.d/51-eipv6` add the following snippet:

```bash
    auto lo:1
    iface lo:1 inet6 static
        address 2a04:c44:c00:3a46:500:2::1337/128
```

Then invoke `ifup lo:1` to configure the IPv6 address on respective interface.
For additional IPv6 addresses from the Elastic IPv6 prefix, use `lo:2`, `lo:3`, et cetera.

---

url: https://community.exoscale.com/product/networking/eip/how-to/configure-manual-eip/

---

# Configure a Manual Elastic IP

**Manual Elastic IPs require additional configuration** on the target instance
for that instance to receive traffic.

> [!WARNING] 
> The Elastic IP address is set up as an additional IP address for your instance. 
> The original IP address will still work, as it is used for outgoing connections. 
> **Do not remove the original IP address of the instance** as the Elastic IP will not work without it. 
> Several other native functionalities will also break.

The operations and commands to be performed vary depending on your chosen template. Below are a few examples for different templates:


### Ubuntu 
Ubuntu 18.04 LTS (Bionic Beaver)

In `/etc/netplan/51-eip.yaml`, put the following snippet.

```yaml
network:
  version: 2
  renderer: networkd
  ethernets:
    lo:
      match:
        name: lo
      addresses:
        - 203.0.113.202/32
```

And then, apply it: `sudo netplan apply`

### Debian
Debian 11 and Ubuntu 16.04 LTS (Xenial Xerus) or older.

In `/etc/network/interfaces.d/eip.cfg`, add the following snippet:

```bash
    auto lo:1
    iface lo:1 inet static
        address 203.0.113.202/32
```

Then, use `ifup lo:1` to enable the Elastic IP. It will also be enabled
automatically on boot. From here, you should be able to ping your
instance and any service authorized in the associated security group
should be reachable with this Elastic IP as well.

If you need to add any additional Elastic IPs, use `lo:2`, `lo:3`, et cetera.

On Debian 8, you have to add `source /etc/network/interfaces.d/*` in
your `/etc/network/interfaces`.

### CoreOS
Create the configuration file for loopback interface
`/etc/systemd/network/loopback-alias.network`, with the following
content:

```bash
[Match]
Name=lo

[Network]

[Address]
Label=lo:1
Address=203.0.113.202/32
```

Ensure that systemd-networkd is enable:
`sudo systemctl enable systemd-networkd.service`

To apply the configuration, run `sudo systemctl restart systemd-networkd`
to restart. It will also be enabled automatically on boot. You can now ping the
Elastic IP address and any service authorized in the associated Security Group
should be reachable with this Elastic IP as well.

You can add multiple loopback Address blocks.

### SLES

To configure the EIP on SLES edit the network config with:

```bash
sudo vi /etc/sysconfig/network/ifcfg-lo
```

There add a new line below `IPADDR=127.0.0.1/8` with:

```bash
IPADDR_1='203.0.113.202/32'
```

Then apply the changes:

```bash
sudo wicked ifreload lo
```

To connect to the instance via the EIP using SSH:

```bash
ssh sles@203.0.113.202
```

### Other Linux Distributions
You can manually add the Elastic IP address on any Linux Instance with the
following command:

```bash
ip addr add 203.0.113.202/32 dev lo
```

> **Beware**:   
  this configuration will be lost if you reboot the instance in absence of some custom automation.


### OpenBSD
Configure your Elastic IP with this single command:

```bash
echo inet 203.0.113.202/32 > /etc/hostname.lo1
```

You can reconfigure your network on the fly with:

```bash
sh /etc/netstart
```

Since OpenBSD 6.7, it is now required to enable IP routing. This can be done
with the command `sysctl`:

```bash
sysctl net.inet.ip.forwarding=1

# To persist the change upon reboot
echo net.inet.ip.forwarding=1 >> /etc/sysctl.conf
```

### Windows
As a first step, we need to install a special driver for the hardware wizard.
Open a command line and execute the following command:

```bash
hdwwiz
```

You should get the **Add Hardware Wizard**:

![](eip-windows-2.png "Windows: Add Hardware")

Click on **Next**. On the next screen, choose the
**Install the hardware that I manually select from a list**:

![](eip-windows-3.png "Windows: Add Hardware")

Click on **Next**. On the next screen, choose **Network adapters**:

![](eip-windows-4.png "Windows: Add Hardware")

Click on **Next**. On the next screen, choose **Microsoft** in the list on the
left-hand side, then **Microsoft KM-TEST Loopback Adapter** in the list on the
right-hand side:

![](eip-windows-5.png "Windows: Add Hardware")

click on **Next**, then click on **Install**.

The following steps will assign the EIP to the `Loopback` interface and activate `IP Forwarding` to the relevant interfaces. 

> [!NOTE]
> If you don't have `PowerShell` on your instance, please try and install it or let us know about it.
> We will try and provide a different procedure.

Please open your favorite Windows editor and create a file called `EIP.ps` with the following content:

```bash
# Get the EIP in the format XXX.XXX.XXX.XXX/32 from the cli
param(
[string]$EIP
)
# split the address and its mask
$IPAddress=($EIP -split '/' | Select-Object -First 1)
$Mask=($EIP -split '/' | Select-Object -Last 1)
# query http://metadata.exoscale.com/latest/meta-data/local-ipv4 to get the Public IP
$MyPublicIPAddress=(Invoke-WebRequest metadata.exoscale.com/latest/meta-data/local-ipv4).Content.Trim()
# Rename to Loopback
Get-NetAdapter -InterfaceDescription "Microsoft *" | Rename-NetAdapter Name "Loopback"
# Configure the EIP
Get-NetAdapter -Name "Loopback" | New-NetIPAddress -IPAddress $IPAddress -PrefixLength $Mask
# Get the Public interface ifIndex
$PublicInterfaceIndex=(Get-NetIPAddress -AddressFamily IPv4 | Where-Object {$_.IPAddress -match $MyPublicIPAddress} | Select-Object InterfaceIndex)
# Get the Loopback interface ifIndex
$LoopbackInterfaceIndex=(Get-NetIPAddress -AddressFamily IPv4 | Where-Object {$_.IPAddress -match $IPAddress} | Select-Object InterfaceIndex)
# Enable Forwarding
Set-NetIPInterface -ifIndex $PublicInterfaceIndex.InterfaceIndex -Forwarding Enable
Set-NetIPInterface -ifIndex $LoopbackInterfaceIndex.InterfaceIndex -Forwarding Enable
# Print the status after the changes
Get-NetIPInterface -AddressFamily IPv4 | select ifIndex,InterfaceAlias,AddressFamily,ConnectionState,Forwarding | Sort-Object -Property IfIndex | Format-Table
```

Once the file is created you can now add your EIP as follows:

```powershell
EIP.ps 203.0.113.203/32
```

In the same way you can attach multiple EIPs.

---

url: https://community.exoscale.com/product/networking/eip/how-to/creating-eipv6-prefix/

---

# Create an Elastic IPv6 Prefix

To use an Elastic IPv6 prefix, the first step is to allocate it. This can be achieved via the [Portal][portal], the [CLI][cli] or the [API][api].

##  Create a Manual Elastic IPv6 prefix

To create an Elastic IPv6 prefix via the CLI, you need to specify IPv6 `create --ipv6` and your chosen zone. This is what it looks like in the CLI:

```bash
# Mind the --ipv6 flag
exo compute elastic-ip create --ipv6 --zone at-vie-1
 ✔ Creating Elastic IP... 4s
┼────────────────┼──────────────────────────────────────┼
│   ELASTIC IP   │                                      │
┼────────────────┼──────────────────────────────────────┼
│ ID             │ 1eabae57-50c9-4368-a591-8695cbfe37ce │
│ IP Address     │ 2a04:c45:c00:3a46:500:2:0:1          │
│ Address Family │ inet6                                │
│ CIDR           │ 2a04:c45:c00:3a46:500:2::/96         │
│ Description    │                                      │
│ Zone           │ at-vie-1                             │
│ Type           │ manual                               │
┼────────────────┼──────────────────────────────────────┼
```

The Elastic IPv6 prefix is visible in the `CIDR` field, while a reference IPv6 address within that
prefix is displayed in the `IP Address` field. Note that the whole prefix is usable.


##  Create a Managed Elastic IPv6 prefix
Backed by a health check.
 
```bash
exo compute elastic-ip create \
 --ipv6 \
 --zone at-vie-1 \
 --healthcheck-mode tcp \
 --healthcheck-port 80
 ✔ Creating Elastic IP... 3s
┼──────────────────────────┼──────────────────────────────────────┼
│        ELASTIC IP        │                                      │
┼──────────────────────────┼──────────────────────────────────────┼
│ ID                       │ 19f2cc9a-e7a7-4e03-b32c-525c123f4eb2 │
│ IP Address               │ 2a04:c45:c00:3a46:500:3:0:1          │
│ Address Family           │ inet6                                │
│ CIDR                     │ 2a04:c45:c00:3a46:500:3::/96         │
│ Description              │                                      │
│ Zone                     │ at-vie-1                             │
│ Type                     │ managed                              │
│ Healthcheck Mode         │ tcp                                  │
│ Healthcheck Port         │ 80                                   │
│ Healthcheck Interval     │ 10s                                  │
│ Healthcheck Timeout      │ 3s                                   │
│ Healthcheck Strikes OK   │ 3                                    │
│ Healthcheck Strikes Fail │ 2                                    │
┼──────────────────────────┼──────────────────────────────────────┼
```

As seen above, in order to create a managed Elastic IPv6 prefix, you also have to provide the required health check parameters. Without those parameters, an Elastic IPv6 manual type will be created.

---

url: https://community.exoscale.com/product/networking/eip/how-to/attach-eipv6-prefix/

---

# Attach an Elastic IPv6 Prefix

After the Elastic IPv6 prefix has been created, you can then attach it to one or more Compute instances.

To refer to a Elastic IPv6 prefix, use either its unique ID or the reference IPv6 address, as you can see here in the CLI:

```bash
exo compute elastic-ip show 4ef39790-3409-4b2b-aa44-672db338edd5 -z at-vie-1
```

Output:

```bash
┼────────────────┼──────────────────────────────────────┼
│   ELASTIC IP   │                                      │
┼────────────────┼──────────────────────────────────────┼
│ ID             │ 4ef39790-3409-4b2b-aa44-672db338edd5 │
│ IP Address     │ 2a04:c45:c00:3a46:500:2:0:1          │
│ Address Family │ inet6                                │
│ CIDR           │ 2a04:c45:c00:3a46:500:2::/96         │
│ Description    │                                      │
│ Zone           │ at-vie-1                             │
│ Type           │ manual                               │
┼────────────────┼──────────────────────────────────────┼
```

Attach the Elastic IPv6 prefix like this:

```bash
exo compute instance elastic-ip attach my-instance 4ef39790-3409-4b2b-aa44-672db338edd5 -z at-vie-1
```

Output:

```bash
 ✔ Attaching Elastic IP "4ef39790-3409-4b2b-aa44-672db338edd5" to instance "my-instance"... 3s
┼──────────────────────┼──────────────────────────────────────┼
│   COMPUTE INSTANCE   │                                      │
┼──────────────────────┼──────────────────────────────────────┼
│ ID                   │ 8a7dd501-ccc4-4582-867a-347e14bf43ff │
│ Name                 │ my-instance                          │
│ Creation Date        │ 2022-08-25 14:23:04 +0000 UTC        │
│ Instance Type        │ standard.medium                      │
│ Template             │ Linux Ubuntu 20.04 LTS 64-bit        │
│ Zone                 │ at-vie-1                             │
│ Anti-Affinity Groups │ n/a                                  │
│ Security Groups      │ default                              │
│ Private Networks     │ n/a                                  │
│ Elastic IPs          │ 2a04:c45:c00:3a46:500:2:0:1          │
│ IP Address           │ 185.150.8.7                          │
│ IPv6 Address         │ 2a04:c45:c00:3a46:4fa:70ff:fe00:4a   │
│ SSH Key              │ my-instance-1661437382               │
│ Disk Size            │ 50 GiB                               │
│ State                │ running                              │
│ Labels               │ n/a                                  │
┼──────────────────────┼──────────────────────────────────────┼
```

Traffic for any address within the Elastic IPv6 prefix is now routed to `my-instance`.

> [!NOTE]
> in the case of the manual Elastic IPv6, the user has to configure the address within the attached instances.

For the managed Elastic IPv6, traffic towards the reference IPv6 address is transparently forwarded, with no need for additional configuration. The whole Elastic IPv6 prefix is still routed to the attached instances. However, any other IPv6 addresses need to be configured within the instances.

---

url: https://community.exoscale.com/product/networking/eip/how-to/manual-eip-trafficsource/

---

# Use Elastic IP as Traffic Source

There are some cases where you may want to use Elastic IP as a source IP address - for example, if you run an SMTP server. It is possible to achieve that with manual Elastic IPs for applications, which allows you to configure their source IP. The traffic emitted in this setup is seen as coming from the Elastic IP address and not from the native IP address.

For instance, with Postfix, you can add the following line in `/etc/postfix/main.cf`:

```bash
smtp_bind_address = 203.0.113.202
```

Most software has a similar setting for outgoing connections. Search
for the `bind` keyword in the documentation.

> [!WARNING]
> Elastic IP addresses should not be shared across multiple traffic-emitting instances, as it will result in 
> asymmetric routing for returning traffic.

There might be cases when you need to use IPv6 addresses from the Elastic IPv6 prefix as a source for egress traffic. You will need to either:

Configure the Elastic IPv6 addresses as binding addresses on the application level
: For example with Postfix mail server you could use `smtp_bind_address6
  = 2001:240:587:0:250:56ff:fe89:1`

Configure the Elastic IPv6 address as the preferred source on the system's routing level
: There are several ways to implement a preferred source at the level of
  routing, depending on the operating system and personal preference. Here are
  two examples with `netplan` and `systemd-networkd`, two popular networking
  options in the Linux world.


## IPv6 modification with `netplan`
Modifying the default IPv6 source address with `netplan`.

Assuming you need to use `2a04:c44:c00:3a46:500:2::1337` as the source IPv6 address for all egress traffic:

```bash
sudo ip -6 address add 2a04:c44:c00:3a46:500:1:0:1337/128 dev lo
```

Then

```bash
cat <<EOF | sudo tee /etc/netplan/51-eipv6-source.yaml
---
network:
  version: 2
  renderer: networkd
  ethernets:
    eth0:
      routes:
        - to: default
          from: 2a04:c44:c00:3a46:500:2::1337
          via: $(ip -6 r show default | awk '{print $3}')
          metric: 99
EOF
```

and then invoke `sudo netplan apply`.

## IPv6 modification with `systemd-networkd`
Modifying the default IPv6 source address with `systemd-networkd`.

Assuming you need to use `2a04:c44:c00:3a46:500:2::1337` as the source IPv6 address for all egress traffic:

```bash
sudo ip -6 address add 2a04:c44:c00:3a46:500:1:0:1337/128 dev lo
```

Then

```bash
cat << EOF | sudo tee /etc/systemd/network/eth0.network
```

```bash
> [Match]
Name=eth0

[Network]
DHCP=ipv4
LinkLocalAddressing=ipv6
IPv6AcceptRA=yes

[Route]
Destination=::/0
Gateway=_ipv6ra
PreferredSource=2a04:c44:c00:3a46:500:1:0:1337
Metric=99
EOF
```

and then invoke `sudo systemctl restart systemd-networkd`.

---

url: https://community.exoscale.com/product/networking/eip/how-to/managed-eip-healthcheck/

---

# Configure Elastic IP Health Checks

Managed Elastic IPs have an integrated health check. The health check will
periodically run on the attached instances in order to prevent sending ingress
traffic to an instance that is unable to receive it for various reasons, such
as during maintenance or a crash.

The health check can be configured in one of the following modes:

TCP
: check that a TCP connection can be successfully established on a given port.

HTTP
: check that an HTTP request can be successfully performed on a given port and
  URL path. HTTP checks are considered failed if the response status code is
  equal or greater than 400. __Redirects are not followed__.

In either mode, you can further configure the following parameters:

Interval
: the time in seconds to wait between two health check tests (default: 10s)

Timeout
: the time in seconds after which an unresponsive health check test is
  considered failed (default: 2s)

Strikes Fail
: the minimum number of failed tests before considering an instance
  __unhealthy__ (default: 3)

Strikes OK
: the minimum number of successful tests before considering an instance
  __healthy__ (default: 2)

> [!NOTE]
> It is not currently possible to retrieve the health status of an instance. 
> While the system will not direct traffic to an unhealthy instance, the 
> internal state of attached instances is not exposed.

Options for managed Elastic IPv6 prefixes are the same as the IPv4 counterpart.

---

url: https://community.exoscale.com/product/networking/eip/service-boundaries/

---

# Service Boundaries - Elastic IP

- [Limits and Quotas - Elastic IP](https://community.exoscale.com/product/networking/eip/service-boundaries/limits-and-quotas/index.md) - Elastic IP Limitations and Quotas
- [SLA - Elastic IP](https://community.exoscale.com/product/networking/eip/service-boundaries/sla/index.md) - Elastic IP Service Level Agreement

- [Pricing ↗︎](https://www.exoscale.com/pricing/#network)

---

url: https://community.exoscale.com/product/networking/eip/service-boundaries/limits-and-quotas/

---

# Limits and Quotas - Elastic IP

## Limits


| Usage | Limit |
| -------------------------------------------------------- | ------------- |
| EIP description maximum characaters | 255 |


* HTTP health checks do not follow redirects.
* Elastic IPv6 prefixes have the same limitations as Elastic IPs.
* Elastic IP will natively work only for incoming traffic. Outgoing traffic will still use the native instance's IP address as a source. This behavior can be partially circumvented manually with manual Elastic IPs.
* Instances associated with a managed Elastic IP will see incoming Elastic IP traffic destined to their primary interface IP address.
* With managed Elastic IPs, it is currently not possible to retrieve the health status of an instance: while the system will not direct traffic to a unhealthy instance, there is no information about which instance is in an unhealthy state.
* For managed Elastic IPv6 prefixes, only the first-plus-one IPv6 address of that prefix is transparently forwarded to the associated instances.



## Quotas

| Usage | Quota |
| :------ | :------: |
| Elastic IP adresses count | 5 |

## Availability
EIP is available in all zones.

---

url: https://community.exoscale.com/product/networking/eip/service-boundaries/sla/

---

# SLA - Elastic IP



These product-specific SLAs define the Service Availability Target for Exoscale Elastic IP (EIP). It applies to each Client using the Service. Capitalized terms used herein but not defined herein shall have the meanings set forth in the Exoscale Terms and Conditions or EUSA, whichever applies.

## SLA Definitons
| Metric | Target | Definition |
| -------- | -------- | ------------ |
| Service Availability for Elastic IP | >= 99.95% Monthly Uptime Percentage | The percentage of time in a calendar month during which an Exoscale Elastic IP address is operational and reachable. Unavailability means that the Client is unable to access its subscribed resources running on the Exoscale Service platform due to the failure of a critical component like an Elastic IP. |

## Product Specifications
For detailed product features, technical specifications, and tutorials, please refer to the [Exoscale documentation](https://community.exoscale.com/product/networking/eip/index.md).

## Client Responsibilities
While Exoscale is responsible for operating and maintaining the Elastic IP service, Clients remain responsible for the following:

- Instance attachment and detachment management
- Health check configuration for managed EIPs
- Firewall and security group rules for EIP traffic
- Failover automation setup when applicable

For a complete explanation of the shared responsibility framework between Exoscale and Clients, please see the [Exoscale Shared Responsibility Model documentation](https://community.exoscale.com/platform/compliance/shared-responsability-model/index.md).

## Exclusions
For the complete list of SLA exclusions, please refer to the [General Exoscale Terms and Conditions](https://www.exoscale.com/terms/).

## Retribution
The standard retribution and SLA credit schemes apply for this product as described under [General Exoscale Terms and Conditions](https://www.exoscale.com/terms/) or [EUSA](https://www.exoscale.com/eusa/) whichever applies. In the event that the Monthly Uptime Percentage for Exoscale EIP falls below the committed Service Level Objective, the Client will be eligible for service credits as follows:

| Monthly Uptime Percentage | Service Credit Percentage of Monthly Service Fees for Affected Resources |
| -------- | -------- |
| from 99.95% to 98.3% | 50% |
| below 98.3% | 100% |

### Claim Service Credit

To request a service credit, refer to the Service Unavailability Credit section of the [Exoscale Terms and Conditions](https://www.exoscale.com/terms/) or the [EUSA](https://www.exoscale.com/eusa/), whichever applies.

---

url: https://community.exoscale.com/product/networking/eip/reference/

---

# Reference - Elastic IP

- [API Elastic IP](https://community.exoscale.com/reference/api/compute/elastic-ip/index.md) - All operations on Elastic IP. (external)
- [CLI Elastic IP](https://community.exoscale.com/reference/cli/exo/compute/elastic-ip/index.md) - All commands on Elastic IP. (external)
