- 작성시간 : 2018/10/19 09:58
- 퍼머링크 : mcchae.egloos.com/11311356
- 덧글수 : 3
근 10여년 이상 사용해 오던 우분투 서버의 네트워크 설정이 변경되었군요.
그동안은 /etc/network/interfaces 파일을 직접 수정해서 설정을 바꾸었는데요,
이제는 설정의 표준처럼 바뀌어버린 yaml 형식으로 변경되었네요.
위치도 /etc/netplan 입니다. 그 안에 있는 *.conf 설정을 수정하는 모양입니다.
우선
$ cat /etc/netplan/50-cloud-init.yaml
# This file is generated from information provided by
# the datasource. Changes to it will not persist across an instance.
# To disable cloud-init's network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
ethernets:
enp0s5:
addresses: []
dhcp4: true
optional: true
version: 2
와 같이 보입니다.
여기서 아래와 같이 수정하면 됩니다.
network:
ethernets:
enp0s5:
addresses: [192.168.10.87/24]
gateway4: 192.168.10.1
nameservers:
addresses: [8.8.8.8, 8.8.4.4]
dhcp4: no
version: 2
그 다음 적용하는 것은
$ sudo netplan apply
입니다.
어느 분께는 도움이 되셨기를..
덧글