-
Notifications
You must be signed in to change notification settings - Fork 0
/
99-network-config_static.yaml
39 lines (39 loc) · 1.3 KB
/
99-network-config_static.yaml
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
# https://netplan.io/examples
# /run/systemd/{network,resolve}
# default renderer is networkd (NetworkManager is already move to snapd)
# so FORCE to use systemd-networkd here
# force to use ipv4 only (link-local)
# link-local: [ ] # To avoid that netplan create Zero Configuration Network 169.254.0.0 and generate IPv6 IP
# Ref. https://netplan.io/reference
# although 'use-dns' can be set to false, but when command 'resolvectl' executed, systemd-resolv.service will be started
# so leave it to default use-dns: true (using systemd-resolv)
# ----------------------------------------------------
# static ip sample
# ----------------------------------------------------
network:
renderer: networkd
version: 2
ethernets:
{{this_network_interface}}:
link-local: [ ]
addresses:
- {{this_ip}}
routes:
- to: default
via: {{this_gateway}}
nameservers:
search: [ {{search}} ]
addresses: [ {{nameserver}} ]
# ----------------------------------------------------
# DHCP
# ----------------------------------------------------
#network:
# renderer: networkd
# version: 2
# ethernets:
# {{this_network_interface}}:
# link-local: [ ]
# dhcp4: true
# nameservers:
# search: [ {{search}} ]
# addresses: [ {{nameserver}} ]