You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pages/dedibox-ip-failover/how-to/configure-debian-ubuntu.mdx
+68-39Lines changed: 68 additions & 39 deletions
Original file line number
Diff line number
Diff line change
@@ -41,15 +41,14 @@ This page shows you how to configure a [failover IP](/dedibox-ip-failover/concep
41
41
# The primary network interface
42
42
auto eth0
43
43
iface eth0 inet static
44
-
address 195.154.123.123
45
-
netmask 255.255.255.0
46
-
gateway 195.154.123.1
44
+
address 195.154.123.123
45
+
netmask 255.255.255.0
46
+
gateway 195.154.123.1
47
47
auto eth0:0
48
48
iface eth0:0 inet static
49
49
address ip_failover
50
50
netmask 255.255.255.255
51
51
```
52
-
53
52
<Messagetype="note">
54
53
The interface name `eth0` may vary, depending on your OS version and system configuration. Use the `ifconfig` command to determine the name of your primary network interface.
55
54
</Message>
@@ -59,43 +58,73 @@ This page shows you how to configure a [failover IP](/dedibox-ip-failover/concep
59
58
ifup eth0:0
60
59
```
61
60
62
-
## Failover IP configuration on Ubuntu
61
+
## Failover IP configuration on Ubuntu (Netplan)
63
62
64
-
Since the release of version 18.04 (Bionic Beaver) Ubuntu has switched to [Netplan](https://netplan.io/) for the configuration of network interfaces.
63
+
Since Ubuntu 18.04, Netplan has been the default network configuration system.
65
64
66
-
It is a YAML-based configuration system, which simplifies the configuration process.
65
+
### Steps for Configuring Netplan with Failover IP
67
66
68
-
1. Connect to your Dedibox using SSH.
69
-
2. Open the Netplan configuration file of the main interface in a text editor, for example `nano`:
70
-
```
71
-
sudo nano /etc/netplan/01-netcfg.yaml
72
-
```
73
-
3. Edit the network configuration. The IP addresses have to be written with their [CIDR notation](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#CIDR_notation). The netmask is `/24` for the principal IP of the server and `/32` for each failover IP. Your configuration should look as in the following example:
74
-
```yaml
75
-
network:
76
-
renderer: networkd
77
-
ethernets:
78
-
ensXX:
79
-
addresses:
80
-
- <FAILOVER_IP>/32
81
-
routes:
82
-
- to: 62.210.0.1
83
-
- to: default
84
-
via: 62.210.0.1
85
-
nameservers:
86
-
addresses:
87
-
- 51.159.47.28
88
-
- 51.159.47.26 # Replace the IP of the DNS cache server with the one located in the same physical location as your machine for optimal performance (https://www.scaleway.com/en/docs/account/reference-content/scaleway-network-information/#dns-cache-servers)
89
-
search: []
90
-
version: 2
91
-
```
92
-
<Message type="tip">
93
-
* Make sure to respect the YAML standards when you edit the file, as it might not work if there is a syntax error in your configuration.
94
-
* You can find an extended list of [netplan configuration examples](https://github.com/canonical/netplan/tree/main/examples) in the official Canonical Netplan repository.
95
-
</Message>
96
-
4. Activate the new configuration by running the following command:
97
-
```
98
-
sudo netplan apply
99
-
```
67
+
1. Disable cloud-init network configuration:
68
+
```bash
69
+
sudo mkdir -p /etc/cloud/cloud.cfg.d
70
+
echo'network: {config: disabled}'| sudo tee /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg
71
+
```
72
+
2. Backup and modify the existing Netplan configuration:
0 commit comments