더북(TheBook)

Tip 하이퍼바이저로 가상 서버에서 네트워크 IP 설정


네트워크 IP를 설정하는 부분은 물리 서버나 하이퍼바이저에서 설정하는 부분과 크게 다르지 않습니다. 그러나 가상 서버에서는 오픈스택을 설치하려고 인터넷이 가능한 NAT 네트워크를 하나 더 추가했으므로, 해당 네트워크 정보를 함께 설정해야 합니다.

vi 에디터를 이용해 /etc/network/interfaces 파일을 열어 다음과 같이 설정합니다.

@controller:~# 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 static
    address 192.168.56.101
    netmask 255.255.255.0
    gateway 192.168.56.1

auto enp0s8
iface enp0s8 inet manual
    up ip link set dev $IFACE up
    down ip link set dev $IFACE down

auto enp0s9
iface enp0s9 inet dhcp
신간 소식 구독하기
뉴스레터에 가입하시고 이메일로 신간 소식을 받아 보세요.