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-network-virtual-machine.mdx
+62-54Lines changed: 62 additions & 54 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ content:
7
7
paragraph: Learn how to configure network settings for virtual machines on various operating systems, including Ubuntu, Debian, CentOS, and Windows Server.
@@ -36,74 +36,75 @@ Find below examples of network interface configurations on different distributio
36
36
37
37
Since the release of version 18.04 (Bionic Beaver), Ubuntu has used Netplan for configuring network interfaces. For older releases, refer to the Debian configuration.
38
38
39
-
1. Log into your virtual machine and open the network configuration file `/etc/netplan/01-netcfg.yaml` in a text editor of your choice, for example `nano`:
40
-
```
39
+
1. Log into your virtual machine and open the network configuration file `/etc/netplan/01-netcfg.yaml` in a text editor of your choice:
40
+
```sh
41
41
sudo nano /etc/netplan/01-netcfg.yaml
42
42
```
43
-
2. Create a network configuration as follows. Replace `fail.over.ip.address` with your failover IP address:
43
+
2. Create a network configuration as follows. Replace `<failover_IP>` with your failover IP address:
44
44
```yaml
45
45
network:
46
-
ethernets:
46
+
version: 2
47
+
ethernets:
47
48
ens18:
48
-
addresses:
49
-
- [ "fail.over.ip.address/32" ]
50
-
nameservers:
51
-
addresses: [ "51.159.47.28", "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 performances (https://www.scaleway.com/en/docs/account/reference-content/scaleway-network-information/#dns-cache-servers)
52
-
routes:
53
-
- to: default
54
-
via: 62.210.0.1
55
-
- to: 62.210.0.1/32
56
-
via: fail.over.ip.address
57
-
scope: link
58
-
version: 2
49
+
addresses:
50
+
- <failover_IP>/32
51
+
nameservers:
52
+
addresses: [ "51.159.47.28", "51.159.47.26" ]
53
+
routes:
54
+
- to: default
55
+
via: 62.210.0.1
56
+
- to: 62.210.0.1/32
57
+
via: <failover_IP>
58
+
scope: link
59
59
```
60
60
3. Save the file and exit the text editor.
61
61
4. Apply the new configuration:
62
-
```
62
+
```sh
63
63
sudo netplan apply
64
64
```
65
65
66
66
## Debian
67
67
68
-
1. Log into the virtual machine and edit the file `/etc/network/interfaces` with a text editor of your choice, for example, `nano`:
69
-
```
68
+
1. Log into the virtual machine and edit the network configuration file:
69
+
```sh
70
70
sudo nano /etc/network/interfaces
71
71
```
72
-
2. Configure the network interface as follows. Replace `fail.over.ip.address` with your failover IP address:
73
-
```
72
+
2. Configure the network interface as follows. Replace `<failover_IP>` with your failover IP address:
73
+
```ini
74
74
auto eth0
75
-
iface eth0 inet static
76
-
address fail.over.ip.address
75
+
iface eth0 inet static
76
+
address <failover_IP>
77
77
netmask 255.255.255.255
78
78
pointopoint 62.210.0.1
79
79
gateway 62.210.0.1
80
80
```
81
81
3. Save the file and exit the text editor.
82
-
4. Set the DNS server information by editing the file `/etc/resolv.conf`:
83
-
```
82
+
4. Set the DNS server information:
83
+
```sh
84
84
sudo nano /etc/resolv.conf
85
85
```
86
-
5.Set the DNS resolver by adding the following lines to the file. Then save it and exit the text editor:
87
-
```
86
+
5.Add the following DNS resolvers:
87
+
```plaintext
88
88
nameserver 51.159.47.28
89
89
nameserver 51.159.47.26
90
90
```
91
-
<Messagetype="tip">
92
-
Replace the IP of the DNS cache server with the one located in the same physical location as your machine for optimal performance. [Check the IPs for each data center](/account/reference-content/scaleway-network-information/#dns-cache-servers)
93
-
</Message>
94
-
6. Activate the network on your virtual machine by running:
95
-
```
91
+
6. Activate the network on your virtual machine:
92
+
```sh
96
93
sudo ifup eth0
97
94
```
95
+
*Alternatively, you can restart networking with:*
96
+
```sh
97
+
sudo systemctl restart networking
98
+
```
98
99
99
100
## CentOS
100
101
101
-
1. Log into the virtual machine and edit the file `/etc/sysconfig/network-scripts/ifcfg-eth0` with a text editor of your choice, for example, `nano`:
102
-
```
102
+
1. Log into the virtual machine and edit the network configuration file:
2. Configure the network interface as follows. Replace `fail.over.ip.address` with your failover IP address and `virtual:mac:address` with the virtual MAC of the VM:
106
-
```
106
+
2. Configure the network interface as follows. Replace `<failover_IP>` with your failover IP address and `<virtual_MAC>` with the virtual MAC of the VM:
107
+
```ini
107
108
DEVICE=eth0
108
109
BOOTPROTO=none
109
110
ONBOOT=yes
@@ -112,34 +113,41 @@ Since the release of version 18.04 (Bionic Beaver), Ubuntu has used Netplan for
112
113
PEERDNS=yes
113
114
TYPE=Ethernet
114
115
NETMASK=255.255.255.255
115
-
IPADDR=fail.over.ip.address
116
+
IPADDR=<failover_IP>
116
117
GATEWAY=62.210.0.1
117
-
DNS1=51.159.47.28 # Replace the IP of the DNS cache server with the one located in the same physical location as your machine for optimal performances (https://www.scaleway.com/en/docs/account/reference-content/scaleway-network-information/#dns-cache-servers)
118
+
DNS1=51.159.47.28
118
119
DNS2=51.159.47.26
119
120
ARP=yes
120
-
HWADDR=virtual:mac:address
121
+
HWADDR=<virtual_MAC>
121
122
```
122
-
3. Save the file and close the text editor.
123
-
4. Edit the file `/etc/sysconfig/network-scripts/route-eth0` as follows, then save and exit the text editor:
5.Run the following command to bring the network interface up:
129
-
```
133
+
5.Activate the network interface:
134
+
```sh
130
135
sudo ifup eth0
131
136
```
132
137
133
138
## Windows Server
134
139
135
-
1. Connect to the desktop of your VM in the virtual console, then open the network settings of your server.
136
-
2. Enter the following information in the network adapter configuration:
137
-
* Address: failover IP
138
-
* Subnetmask: `255.255.255.255`
139
-
* Gateway: `62.210.0.1`
140
-
* DNS 1: `51.159.47.28`
141
-
* DNS 2: `51.159.47.26`
142
-
143
-
<Messagetype="tip">
144
-
Replace the IP of the DNS cache server with the one located in the same physical location as your machine for optimal performance. [Check the IPs for each data center](/account/reference-content/scaleway-network-information/#dns-cache-servers)
145
-
</Message>
140
+
1. Open the network settings on your VM by navigating to:
141
+
```
142
+
Control Panel → Network & Internet → Change Adapter Options
143
+
```
144
+
2. Select your network adapter and enter the following details:
145
+
-**IP Address**: `<failover_IP>`
146
+
-**Subnet Mask**: `255.255.255.255`
147
+
-**Gateway**: `62.210.0.1`
148
+
-**DNS 1**: `51.159.47.28`
149
+
-**DNS 2**: `51.159.47.26`
150
+
151
+
<Messagetype="tip">
152
+
Replace the IP of the DNS cache server with the one located in the same physical location as your machine for optimal performance. [Check the IPs for each data center](/account/reference-content/scaleway-network-information/#dns-cache-servers)
0 commit comments