-
Notifications
You must be signed in to change notification settings - Fork 0
/
EC2-Ubuntu18.04-Swap-Dual_NIC-Setup.txt
51 lines (46 loc) · 1.17 KB
/
EC2-Ubuntu18.04-Swap-Dual_NIC-Setup.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
sudo lsblk
sudo mkswap /dev/nvme1n1
sudo swapon -U 1aa13baa-f601-4269-9060-663ac77eef6b
echo 'UUID=1aa13baa-f601-4269-9060-663ac77eef6b none swap sw 0 0' | sudo tee -a /etc/fstab
sudo nano /etc/netplan/50-cloud-init.yaml
ethernets:
ens5:
addresses:
- 172.31.2.68/20
- 172.31.4.172/20
dhcp4: false
match:
macaddress: 09:1A:01:56:62:50
gateway4: 172.31.0.1
set-name: ens5
nameservers:
search: [us-east-2.compute.internal]
addresses: [8.8.8.8, 8.8.4.4]
sudo nano /etc/netplan/51-ens6.yaml
network:
version: 2
renderer: networkd
ethernets:
ens6:
addresses:
- 172.31.22.77/20
- 172.31.25.157/20
dhcp4: no
routes:
- to: 0.0.0.0/0
via: 172.31.16.1 # Default gateway
table: 1000
- to: 172.31.22.77
via: 0.0.0.0
scope: link
table: 1000
- to: 172.31.25.157
via: 0.0.0.0
scope: link
table: 1000
routing-policy:
- from: 172.31.22.77
table: 1000
- from: 172.31.25.157
table: 1000
sudo netplan --debug try