netplan
:: Ubuntu 17.10 에서부터 생긴 네트워크 설정 시스템 (systemd-networkd 제어)
https://wiki.ubuntu.com/ArtfulAardvark/ReleaseNotesNetwork configuration
ifupdown has been deprecated in favor of netplan and is no longer present on new installs. The installer will generate a configuration file for netplan in /etc/netplan, which will set up the system to configure the network via systemd-networkd or NetworkManager. Desktop users will see their system fully managed via NetworkManager as it has been the case in previous releases, but Server users now have their network devices managed via systemd-networkd on new installs. This only applies to new installations.
Given that ifupdown is no longer installed by default, its commands will not be present: ifup and ifdown are thus unavailable, replaced by ip link set $device up and ip link set $device down.
The networkctl command is also available for users to see a summary of the network devices. networkctl status will display the current global state of IP addresses on the system; and networkctl status $device can display the details specific to a network device.
For more information about netplan, please refer to the manual page using the man 5 netplan command.
netplan generate : /etc/netplan에 renderer에 대한 구성들을 생성
netplan apply : renderer에 대한 구성들을 적용하고 재시작
netplan ifupdown-migrate : /etc/network/interfaces의 내용을 마이그레이션 아래 파일위치에서 네트워크 설정
# /etc/netplan/01-netcfg.yaml
.....................
기존 /etc/resolv.conf 파일처럼 수정하기 위해서는 아래 파일 수정
# systemd-resolve --status
Failed to get global data: Unit dbus-org.freedesktop.resolve1.service not found.
# cat /etc/systemd/resolved.conf
..................
[Resolve]
DNS=164.124.101.2
# systemctl restart systemd-resolved.service
아래 파일이 생성
# cat /var/run/systemd/resolve/resolv.conf
..................
nameserver 164.124.101.2
# systemd-resolv --status
Global
DNS Servers: 164.124.101.2
DNSSEC NTA: 10.in-addr.arpa
16.172.in-addr.arpa
168.192.in-addr.arpa
17.172.in-addr.arpa
18.172.in-addr.arpa
19.172.in-addr.arpa
20.172.in-addr.arpa
21.172.in-addr.arpa
22.172.in-addr.arpa
23.172.in-addr.arpa
24.172.in-addr.arpa
25.172.in-addr.arpa
26.172.in-addr.arpa
27.172.in-addr.arpa
28.172.in-addr.arpa
29.172.in-addr.arpa
30.172.in-addr.arpa
31.172.in-addr.arpa
corp
d.f.ip6.arpa
home
internal
intranet
lan
local
private
test
..................
..................