로그인

검색

[ubuntu server 22.04. 3 LTS (Jammy Jellyfish)] IP 고정하기

[ubuntu server 22.04. 3 LTS (Jammy Jellyfish)] IP 고정하기

 

ip address 실행

 

- 이름 확인 ; enp5s0f2

hs7@hansung:~$ ip address
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: enp5s0f2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 00:90:f5:d1:6d:46 brd ff:ff:ff:ff:ff:ff
    inet 192.168.219.150/24 brd 192.168.219.255 scope global enp5s0f2
       valid_lft forever preferred_lft forever
    inet6 fe80::290:f5ff:fed1:6d46/64 scope link
       valid_lft forever preferred_lft forever
3: wlp4s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 44:6d:57:7a:11:8e brd ff:ff:ff:ff:ff:ff

 

 

 

디렉토리 이동 ; cd /etc/netplan

- 수정할 yaml 파일 확인

hs7@hansung:~$ cd /etc/netplan
hs7@hansung:/etc/netplan$ ls
00-installer-config-wifi.yaml  00-installer-config.yaml

 

- 파일 수정

hs7@hansung:/etc/netplan$ sudo nano 00-installer-config.yaml

 

 

- 고정 ip ; 192.168.219.150

network:
  ethernets:
    enp5s0f2:
     # dhcp4: true
     dhcp4: no
     addresses:
     - 192.168.219.150/24
     nameservers:
       addresses: [8.8.8.8, 8.8.4.4]
     routes:
       - to: default
         via: 192.168.219.1
  version: 2

 

 

적용합니다.

hs7@hansung:/etc/netplan$ sudo netplan apply

 

결론

- 잘됩니다.

- 신기한건, 공유기에 표시되지 않네요. (유령)

 

추가

- 이틀이 지난 후에 공유기에 표시 되네요.

 

이 게시물을

이 댓글을 삭제하시겠습니까?