레이블이 ip인 게시물을 표시합니다. 모든 게시물 표시
레이블이 ip인 게시물을 표시합니다. 모든 게시물 표시

2018년 9월 20일 목요일

Ubuntu 18.04 IP 설정

Ubuntu 18.04 IP 설정 설정 방법

Ubuntu 18.04 는 ip address 설정 방법이, Ubuntu 16.04 와 다르다.
정확히는 Ubuntu 17.10 부터 ip address 설정 방법이 달라졌다.

기존 방법에서 사용하던 파일을 open 해보면,
netplan 파일로 변경되었다고 나온다.
% cat /etc/networks/interfaces

netplan 으로 이동하자
% cd /etc/netplan

% ls
50-cloud-init.yaml

1개의 yaml 파일이 존재한다.
상황에 따라 이름이 다를 수도 있고, 갯수가 다를 수도 있는거 같다.
아무튼 vi 같은 editor 로 열어보자.

# This file is generated from information provided by
# the datasource.  Changes to it will not persist across an instance.
# To disable cloud-init's network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
    ethernets:
        enp0s3:
            addresses: []
            dhcp4: true
            optional: true
    version: 2

아래처럼 정보를 입력하면 된다.

# This file is generated from information provided by
# the datasource.  Changes to it will not persist across an instance.
# To disable cloud-init's network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
    ethernets:
        enp0s3:
            addresses: [192.168.0.100/24]
            gateway4: 192.168.0.1
            nameservers:
                    addresses: [168.126.63.1,168.126.63.2]
            dhcp4: false
            optional: true
    version: 2



출처
http://blog.hazard.kr/archives/890
https://ujuc.github.io/2017/11/18/ubuntu_17.10e-seo-bu-teo_gibon-eu-ro_sa-yong-doe-neun_netplan
http://blog.hkwon.me/ubuntu-18-04-netplan
https://websiteforstudents.com/configuring-static-ips-ubuntu-17-10-servers
https://websiteforstudents.com/configure-static-ip-addresses-on-ubuntu-18-04-beta

2018년 9월 10일 월요일

Ubuntu 16.04 IP 주소 설정

Ubuntu 16.04 IP 주소 설정 방법

네트워크 설정이 기록되어 있는 파일을 수정하면 된다.
% sudo vi /etc/network/interfaces

#iface enp0s3 inet dhcp
#기존 DHCP 는 안쓰기 때문에 주석처리 해놓는다.

iface enp0s3 inet static
#고정IP 방식을 사용하기 위해선 static 을 입력한다.

address 192.168.0.100
#내부 IP 주소나 외부 IP주소를 address 항목에 입력한다.

netmask 255.255.255.0
#서브넷 마스크를 입력한다.

gateway 192.168.0.1
#Gateway IP 를 입력한다. 공유기를 사용하는 경우 공유기 내부 환경설정을 위해 들어가는 IP 주소가 Gateway 이다.

dns-nameservers 168.126.63.1 168.126.63.2
#dns 서버를 입력한다. 스페이스바를 통해 보조DNS 설정이 가능하다. 첫번째가 메인 DNS, 두번째가 서브 DNS 이다.

설정 완료 후 네트워크를 다시 시작하자.
sudo systemctl restart networking.service



출처
https://blog.supersu.kr/computer/linux/ubuntu/how-to-ubuntu-16-04-static-ip-settings
https://www.manualfactory.net/10108

화곡 어쩌라고, 굴사냥

석화찜(굴찜)을 먹으러 여의도로 갔다 그런데 재료가 모두 소진되었다고 마감이라고 한다 응? 다들 굴에 미쳤나? 굴을 찾아 헤매다 보니, 화곡까지 가게 되었다. 화곡은 처음 가본다. 첫인상은 "술집 겁네 많네" 피똥쌀때까지 마실 수 있...