티스토리 뷰

1. 

BOOTPROTO=none
ONBOOT=yes
IPADDR=192.168.56.101
NETMASK=255.255.255.0
DEVICE=enp0s8
PEERDNS=no
ZONE=public

 

 

=우분투=

 

 

설정 파일

네트워크 설정 파일은 /etc/network/interfaces입니다.

설정 파일 수정

우분투를 유동 IP로 설치했다면 설정 파일의 내용은 다음과 비슷하게 되어 있습니다.

# The primary network interface auto enp0s3 iface enp0s3 inet dhcp

이를 다음처럼 바꿉니다. (xxx.xxx.xxx.xxx는 네트워크 환경에 맞게 수정합니다.)

# The primary network interface auto enp0s3 iface enp0s3 inet static address xxx.xxx.xxx.xxx netmask xxx.xxx.xxx.xxx gateway xxx.xxx.xxx.xxx dns-nameservers xxx.xxx.xxx.xxx

네트워크 재시작 또는 재부팅

다음과 같이 명령하여 네트워크를 재시작합니다.

systemctl restart networking.service

만약 위와 같이 해도 IP가 바뀌지 않는다면 재부팅합니다.

네트워크 상황은 다음 명령으로 확인할 수 있습니다.

ifconfig

 

댓글