Skip to content

Commit a0cb08c

Browse files
authored
Added info about second ipconfig using netplan
We have Ubuntu 14/16, but not 18, which changed to netplan. Added info about netplan process.
1 parent 1a92764 commit a0cb08c

File tree

1 file changed

+73
-0
lines changed

1 file changed

+73
-0
lines changed

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

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,79 @@ We recommend looking at the latest the documentation for your Linux distribution
106106

107107
You should see the IP address you added as part of the list.
108108

109+
### Linux (Ubuntu 18.04+)
110+
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.
111+
112+
1. Open a terminal window.
113+
2. Make sure you are the root user. If you are not, enter the following command:
114+
115+
```bash
116+
sudo -i
117+
```
118+
119+
3. Create a file for the second interface and open it in a text editor:
120+
121+
```bash
122+
vi /etc/netplan/60-static.yaml
123+
```
124+
125+
4. Add the following lines to the file, replacing `10.0.0.6/24` with your IP/netmask:
126+
127+
```bash
128+
network:
129+
version: 2
130+
ethernets:
131+
eth0:
132+
addresses:
133+
- 10.0.0.6/24
134+
```
135+
136+
5. Save the file by using the following command:
137+
138+
```bash
139+
:wq
140+
```
141+
142+
6. Test the changes using [netplan try](http://manpages.ubuntu.com/manpages/cosmic/man8/netplan-try.8.html) to confirm syntax:
143+
144+
```bash
145+
netplan try
146+
```
147+
148+
>[!NOTE]
149+
>`netplan try` will apply the changes temporarily, and will roll them back after 120 seconds. If there is a loss of connectivity, please wait 120 seconds then re-connect. At that time, the changes will have been rolled back.
150+
151+
7. Assuming no issues with `netplan try`, apply the configuration changes:
152+
153+
```bash
154+
netplan apply
155+
```
156+
157+
8. Verify the IP address is added to the network interface with the following command:
158+
159+
```bash
160+
ip addr list eth0
161+
```
162+
163+
You should see the IP address you added as part of the list. Example:
164+
165+
```bash
166+
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
167+
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
168+
inet 127.0.0.1/8 scope host lo
169+
valid_lft forever preferred_lft forever
170+
inet6 ::1/128 scope host
171+
valid_lft forever preferred_lft forever
172+
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
173+
link/ether 00:0d:3a:8c:14:a5 brd ff:ff:ff:ff:ff:ff
174+
inet 10.0.0.6/24 brd 10.0.0.255 scope global eth0
175+
valid_lft forever preferred_lft forever
176+
inet 10.0.0.4/24 brd 10.0.0.255 scope global secondary eth0
177+
valid_lft forever preferred_lft forever
178+
inet6 fe80::20d:3aff:fe8c:14a5/64 scope link
179+
valid_lft forever preferred_lft forever
180+
```
181+
109182
### Linux (Red Hat, CentOS, and others)
110183

111184
1. Open a terminal window.

0 commit comments

Comments
 (0)