ubuntu 18.04 LTS 부터 netplan으로 네트워크 설정방식이 변경
$ ls /sys/class/net
ens160 lo
$sudo vi /etc/netplan/00-installer-config.yaml
network:
ethernets:
ens160:
addresses:
- x.x.x.173/24
gateway4: x.x.x.254
nameservers:
addresses:
- 168.126.63.1
# search: [lesstif.com]
# dhcp4: yes
dhcp4: no
# optional: true
version: 2
-----------------또는------------------------
network:
ethernets:
enp0s31f6:
addresses: [x.x.x.14/24]
gateway4: x.x.x.1
nameservers:
addresses: [168.126.63.1,8.8.8.8]
# search: [lesstif.com]
# dhcp4: yes
dhcp4: no
# optional: true
version: 2
:wq!
--------------------------------------
$sudo netplan apply
$ifconfig
$ cat /etc/netplan/00-installer-config.yaml
# This is the network config written by 'subiquity'
network:
ethernets:
ens160:
addresses:
- x.x.x.172/24
gateway4: x.x.x.254
nameservers:
addresses:
- 168.126.63.1
version: 2
'linux' 카테고리의 다른 글
ansible 설치 및 ansible로 nginx 설치 (0) | 2021.05.31 |
---|---|
Centos Master/Slave DNS 설정 (0) | 2021.01.15 |
centos 8 - freeIPA (LDAP) 설치 + Kerberos (0) | 2021.01.08 |
centos 8 - galera + mariadb 마이그레이션 (0) | 2021.01.08 |
centos 8 - galera + mariadb 설치 (0) | 2021.01.07 |