5. 컨트롤러 노드의 네트워크 설정이 완료되면 이제 컴퓨트 노드의 네트워크를 설정하겠습니다. 컴퓨트 노드를 로그인하고 root 계정으로 전환합니다. 그리고 /etc/network/interfaces 파일을 열어 앞에서 그린 네트워크 구성도에 맞게 IP를 설정합니다. 컨트롤러 노드와 마찬가지로 eth0은 static으로, eth1은 manual로 설정합니다(가상 서버를 이용한 네트워크 설정이라면 ‘하이퍼바이저로 가상 서버에서 네트워크 IP 설정’ 참고).
nalee@compute:~$ sudo su [sudo] password for nalee: root@compute:/home/nalee# cd /etc/network root@compute:/etc/network# vi 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 eth0 iface eth0 inet static address 192.168.56.102 netmask 255.255.255.0 gateway 192.168.56.1 dns-nameservers 8.8.8.8
auto eth1 iface eth1 inet manual up ip link set dev $IFACE up down ip link set dev $IFACE down