Skip to content

Commit d2e8c15

Browse files
authored
public repo edits
1 parent a0cb08c commit d2e8c15

File tree

1 file changed

+29
-29
lines changed

1 file changed

+29
-29
lines changed

includes/virtual-network-multiple-ip-addresses-os-config.md

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -52,59 +52,59 @@ We recommend looking at the latest the documentation for your Linux distribution
5252
1. Open a terminal window.
5353
2. Make sure you are the root user. If you are not, enter the following command:
5454

55-
```bash
56-
sudo -i
57-
```
55+
```bash
56+
sudo -i
57+
```
5858

5959
3. Update the configuration file of the network interface (assuming ‘eth0’).
6060

6161
* Keep the existing line item for dhcp. The primary IP address remains configured as it was previously.
6262
* Add a configuration for an additional static IP address with the following commands:
6363

64-
```bash
65-
cd /etc/network/interfaces.d/
66-
ls
67-
```
64+
```bash
65+
cd /etc/network/interfaces.d/
66+
ls
67+
```
6868

6969
You should see a .cfg file.
7070
4. Open the file. You should see the following lines at the end of the file:
7171

72-
```bash
73-
auto eth0
74-
iface eth0 inet dhcp
75-
```
72+
```bash
73+
auto eth0
74+
iface eth0 inet dhcp
75+
```
7676

7777
5. Add the following lines after the lines that exist in this file:
7878

79-
```bash
80-
iface eth0 inet static
81-
address <your private IP address here>
82-
netmask <your subnet mask>
83-
```
79+
```bash
80+
iface eth0 inet static
81+
address <your private IP address here>
82+
netmask <your subnet mask>
83+
```
8484

8585
6. Save the file by using the following command:
8686

87-
```bash
88-
:wq
89-
```
87+
```bash
88+
:wq
89+
```
9090

9191
7. Reset the network interface with the following command:
9292

93-
```bash
94-
sudo ifdown eth0 && sudo ifup eth0
95-
```
93+
```bash
94+
sudo ifdown eth0 && sudo ifup eth0
95+
```
9696

97-
> [!IMPORTANT]
98-
> Run both ifdown and ifup in the same line if using a remote connection.
99-
>
97+
> [!IMPORTANT]
98+
> Run both ifdown and ifup in the same line if using a remote connection.
99+
>
100100

101101
8. Verify the IP address is added to the network interface with the following command:
102102

103-
```bash
104-
ip addr list eth0
105-
```
103+
```bash
104+
ip addr list eth0
105+
```
106106

107-
You should see the IP address you added as part of the list.
107+
You should see the IP address you added as part of the list.
108108

109109
### Linux (Ubuntu 18.04+)
110110
Ubuntu 18.04 and above have changed to `netplan` for OS network management. We recommend looking at the latest the documentation for your Linux distribution.

0 commit comments

Comments
 (0)