시스템운영
IP 설정하기
보이드메인
2020. 3. 17. 09:31
/etc/network/interfaces 파일을 열고 아래와 같이 IP 정보를 기입한다.
enp0s3 로 현재 nat 어댑터로 구성이 되어 있고 신규로 enp0s8 어댑터에 대해서 호스트 전용 네트워크를 설정한다.
$ sudo vi /etc/network/interfaces
# This file describes the network interfaces available on your system# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto enp0s3
iface enp0s3 inet dhcp
# The host-only network interface 신규로 추가
auto enp0s8
iface enp0s8 inet static
address 192.168.253.101
netmask 255.255.255.0
network 192.168.253.0
설정이 완료 됐으면 network service를 재시작한다.
$ sudo systemctl restart networking
or
$ sudo /etc/init.d/networking restart