• 돌아가기
  • 아래로
  • 위로
  • 목록
  • 댓글
Ubuntu

Ubuntu 20.04 LTS 고정 IP할당하기.

달소 달소 311

0

0

 

 

Ubuntu 20.04 LTS가 출시되고 변경점이 있는지 하나하나 테스트중입니다.

이번에는 설치하고 나서 가장 먼저 해야할(?) 고정 IP 할당입니다.
고정 IP를 할당하지않으면 DHCP를 통해 IP가 자꾸바뀌는 불상사가있을 수 도 있기때문에 필수적으로 제일먼저해야합니다.

확인해봤는데 18.04 LTS 과 동일하게 netplan의 파일을 수정하면 됩니다.

기본적으로 파일 경로는 /etc/netplan/50-cloud-init.yaml 에있습니다. 파일이름은 상이할 수 있습니다.

기본 파일 내용(DHCP일경우)

고정 IP로 수정하기

vi /etc/netplan/50-cloud-init.yaml

network:
  ethernets:
    ens160:
      addresses:
      - 192.168.1.60/24
      gateway4: 192.168.1.1
      nameservers:
        addresses:
        - 8.8.8.8
        search:
        - 8.8.4.4
  version: 2

인터페이스도 꼭 확인이 필요합니다.
ip addresses는 공유기의 대역대에 맞게 수정하면됩니다.

61로 바꾸고 저장해보겠습니다.

변경이 모두 완료되었으면 netplan apply 명령어로 적용시켜줍니다.

인터페이스는 ifocnfig 명령어로 쉽게 확인가능합니다.

 

그리고 변경된 IP로 다시 접속해보면 잘되는걸 볼 수 있습니다.

신고공유스크랩
0

달소 달소
98Lv. 194128P
다음 레벨까지 1892P


메인서버 - Ryzen 5700G / Proxmox 7.2 / Ubuntu / Xpenology / 기타 VM 등등
보조서버 - Intel i9-9900ES(QQC0) / H370M / Proxmox 7.1 / 아직개발용서버로 사용중
백업스토리지서버 - DS920+ 
하드웨어,가상화 등등 여러 IT분야에 관심이 두루두루많습니다만 깊게알고있는건 없습니다 하하하

댓글 쓰기 권한이 없습니다. 로그인

취소 댓글 등록

신고

"님의 댓글"

이 댓글을 신고하시겠습니까?

댓글 삭제

"님의 댓글"

삭제하시겠습니까?


목록

공유

facebooktwitterpinterestbandkakao story

본 게시판은 서버구축 게시판과 통합되었습니다.

서버구축 게시판 이동하기
분류 제목 글쓴이 날짜 조회 추천
공지 서버OS(ESXi/Linux/Router 등) 게시판 이용안내. 달소 21.11.16.17:43 589 +1
ESXi 공지 ESXi 관련 추천글 모음 5 달소 21.04.23.12:19 3769 +6
ESXi USB LAN으로 ESXi8 설치하기.(Feat. Realtek LAN) 15 달소 23.01.01.18:51 2198 +2
Assistant OS 당신이 알아야할 새로운 스탠다드 Matter란 무엇인가 5 DarkAcid 22.12.30.02:38 744 +1
Proxmox 인텔 igpu는 gvt-g를 이용해 두개 이상의 가상머신에 패스스루 해줄 수 있네요. 13 니즛 22.12.23.02:19 1391 +1
Ubuntu
image
달소 22.12.16.11:00 639 0
Ubuntu
normal
만곰이 22.11.17.13:20 183 0
Ubuntu
image
레노 22.10.01.09:43 1752 +2
Ubuntu
image
달소 22.09.05.17:26 2058 0
Ubuntu
image
달소 22.08.21.15:03 668 0
Ubuntu
image
달소 22.08.01.22:56 8277 +4
Ubuntu
image
달소 22.08.01.22:29 1094 0
Ubuntu
image
고양이 22.07.09.23:24 484 +3
Ubuntu
image
달소 22.06.25.20:23 511 +2
Ubuntu
image
나스초보 22.06.14.17:20 221 0
Ubuntu
normal
섭리 22.06.01.19:30 116 0
Ubuntu
image
달소 22.05.19.13:27 827 +2
Ubuntu
image
달소 22.05.12.12:00 923 +1
Ubuntu
image
달소 22.05.03.15:15 1226 +4
Ubuntu
image
달소 22.05.03.14:51 1672 +3
Ubuntu
image
달소 22.05.03.09:26 1640 0
Ubuntu
image
달소 22.04.28.18:44 611 +1
Ubuntu
image
달소 22.04.28.18:19 288 0
Ubuntu
image
달소 22.04.22.11:46 2318 +3
Ubuntu
image
달소 22.04.22.11:12 203 +3
Ubuntu
normal
서버융 22.04.19.16:57 92 +1
Ubuntu
image
달소 22.04.04.17:28 4794 +3
Ubuntu
image
달소 22.04.01.17:29 5498 +5
Ubuntu
image
달소 22.04.01.15:34 5073 +3
Ubuntu
image
달소 22.04.01.14:58 851 +1
Ubuntu
image
달소 22.04.01.11:35 84 +1
Ubuntu
image
달소 22.03.30.21:30 1030 +1
Ubuntu
normal
syaro 22.03.19.18:15 605 +1
Ubuntu
image
달소 21.12.07.23:47 853 +1
Ubuntu
image
광기의초심자 21.11.20.22:27 271 +1
Ubuntu
image
달소 21.10.09.21:29 177 +1
Ubuntu
image
달소 21.08.05.12:10 155 0
Ubuntu
image
달소 21.07.15.18:26 212 0
Ubuntu
image
달소 21.07.10.21:14 158 0
Ubuntu
image
달소 21.07.10.13:21 144 +1
Ubuntu
image
달소 21.05.11.11:22 285 0
Ubuntu
image
달소 21.04.28.18:00 295 0
Ubuntu
image
달소 21.04.22.17:11 332 +1
Ubuntu
image
달소 21.04.22.14:28 242 0
Ubuntu
image
달소 21.04.22.11:37 741 0
Ubuntu
image
달소 21.04.15.15:09 215 0
Ubuntu
image
달소 21.04.15.04:56 613 +2
Ubuntu
image
달소 21.03.26.16:55 594 +1
Ubuntu
image
달소 21.03.22.23:48 756 0
Ubuntu
image
달소 21.03.22.22:59 619 +1
Ubuntu
image
달소 21.03.19.23:52 38 0
Ubuntu
image
달소 21.03.19.23:31 377 0
Ubuntu
image
달소 21.03.19.18:34 144 0
Ubuntu
image
달소 21.03.17.18:31 216 0
Ubuntu
image
달소 21.03.17.16:50 281 +1
Ubuntu
image
달소 21.02.26.15:02 1576 0
Ubuntu
image
달소 21.01.25.14:19 209 0
Ubuntu
image
달소 21.01.19.22:52 130 +1
Ubuntu
image
달소 21.01.19.14:53 392 0
Ubuntu
image
달소 21.01.15.23:25 257 +1
Ubuntu
image
달소 21.01.15.18:45 295 0
Ubuntu
image
달소 21.01.12.11:51 215 0
Ubuntu
image
달소 21.01.11.18:21 161 +1
Ubuntu
image
달소 21.01.07.16:13 137 0
Ubuntu
image
달소 21.01.06.20:51 311 0
Ubuntu
image
달소 21.01.06.15:18 218 +1
Ubuntu
image
달소 20.12.31.12:30 98 0
Ubuntu
image
달소 20.12.31.12:29 154 0