{"id":875,"date":"2024-03-09T14:35:54","date_gmt":"2024-03-09T05:35:54","guid":{"rendered":"https:\/\/www.fsquare.co.kr\/?p=875"},"modified":"2024-03-28T10:53:50","modified_gmt":"2024-03-28T01:53:50","slug":"raspberry-pi-5-bookworm%ec%97%90%ec%84%9c-%ea%b3%a0%ec%a0%95-ip-%eb%b3%80%ea%b2%bd-%eb%b0%a9","status":"publish","type":"post","link":"https:\/\/www.fsquare.co.kr\/?p=875","title":{"rendered":"Raspberry Pi 5 Bookworm\uc5d0\uc11c \uace0\uc815 IP \ubcc0\uacbd \ubc29\ubc95"},"content":{"rendered":"<p>[\ucd9c\ucc98] https:\/\/www.abelectronics.co.uk\/kb\/article\/31\/set-a-static-ip-address-on-raspberry-pi-os-bookworm<\/p>\n<p>&nbsp;<\/p>\n<p>This tutorial details how to set up a static network IP address on the Ethernet or WiFi connection\u00a0on the Raspberry Pi OS Bookworm image, released October 2023, from\u00a0<a href=\"https:\/\/www.raspberrypi.org\/software\/operating-systems\/\">https:\/\/www.raspberrypi.org\/software\/operating-systems\/<\/a>.<\/p>\n<p>With the release of Raspberry Pi OS Bookworm, networking on the Raspberry Pi was changed to use NetworkManager as the standard controller for networking, replacing the previous dhcpcd system. NetworkManager includes a command line tool called &#8220;nmcli,&#8221; which can control NetworkManager and report on the network status.<\/p>\n<p>This tutorial will use &#8220;nmcli&#8221; to configure the network to use a static IP address.<\/p>\n<p>We will give the Raspberry Pi a static IP address of 10.0.0.220. The gateway address will be set at 10.0.0.1, and the DNS server will also be set to 10.0.0.1<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Step 1:<\/strong><\/p>\n<p>The first step is to find the name of the network interface you want to set as static. Run the following command in a terminal to display a list of available network interfaces.<\/p>\n<pre class=\"cmd\"><strong>sudo nmcli -p connection show<\/strong><\/pre>\n<p>You should see a listing like the one below.<\/p>\n<pre class=\"code\">======================================\r\n  NetworkManager connection profiles\r\n======================================\r\nNAME                UUID                                  TYPE      DEVICE\r\n----------------------------------------------------------------------------\r\nWired connection 1  bd220d18-7d6a-36a5-9820-4f67de2c01fc  ethernet  eth0\r\nmywifi              2359440b-8991-4c86-a905-b011dced4587  wifi      wlan0\r\nlo                  c29ba7c5-98ff-4fa0-8d8e-06b30b8ec384  loopback  lo\r\n<\/pre>\n<p>The default name for the wired ethernet connection for English locales is &#8220;Wired connection 1&#8221;. This name may be different if you use another language; for example, the German name will be &#8220;Kabelgebundene Verbindung 1&#8221;. To find the correct connection name, look for the row with a Type of &#8220;ethernet&#8221;.<\/p>\n<p>The WiFi connection will typically have the name of your WiFis SSID. If your Raspberry Pi uses different names for the network connections or you would like to change your WiFi IP address, replace &#8220;Wired connection 1&#8221; with the correct name in the following commands.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Step 2:<\/strong><\/p>\n<p>Now we know the name of the network connection we want to update,\u00a0we can send three commands to set the new IP address, Gateway and DNS server.<\/p>\n<pre class=\"cmd\"><strong>sudo nmcli c mod \"Wired connection 1\" ipv4.addresses 10.0.0.220\/24 ipv4.method manual\r\n\r\nsudo nmcli con mod \"Wired connection 1\" ipv4.gateway 10.0.0.1\r\n\r\nsudo nmcli con mod \"Wired connection 1\" ipv4.dns 10.0.0.1\r\n\r\n<\/strong><\/pre>\n<p>\ud55c\uae00\ub85c \uc138\ud305\ud558\ub294 \uacbd\uc6b0 &#8220;Wired connection 1&#8243;\uc774 &#8220;\uc720\uc120\uc5f0\uacb01 &#8221; \uacfc \uac19\uc774 \ud55c\uae00\ub85c \ub418\uc5b4 \uc788\ub294 \uacbd\uc6b0\uac00 \uc788\ub2e4. \uc774\ub54c\ub294 \ud55c\uae00\uc778\uc2dd\uc774 \uc798 \uc548\ub418\ubbc0\ub85c \uadf8\ub0e5 UUID\ub97c \ub530\uc634\ud45c \uc5c6\uc774 \uc801\uc5b4\uc918\ub3c4 \ubb34\ubc29\ud558\ub2e4.<\/p>\n<p><strong>sudo nmcli c mod &#8220;Wired connection 1&#8221; ipv4.addresses 10.0.0.220\/24 ipv4.method manual<\/strong><\/p>\n<p>= <strong>sudo nmcli c mod\u00a0 bd220d18-7d6a-36a5-9820-4f67de2c01fc\u00a0 \u00a0ipv4.addresses 10.0.0.220\/24 ipv4.method manual<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>If you want to use multiple DNS servers, you can add them separated by commas; for example, to use Google&#8217;s DNS servers, use the following.<\/p>\n<pre class=\"cmd\"><strong>sudo nmcli con mod \"Wired connection 1\" ipv4.dns \"8.8.8.8,8.8.4.4\"<\/strong><\/pre>\n<p>&nbsp;<\/p>\n<p>The same method can be used for adding multiple IP addresses to the same network connection; for example, the following command would assign IP addresses 10.0.0.220, 10.0.0.221 and 10.0.0.222.<\/p>\n<pre class=\"cmd\"><strong>sudo nmcli c mod \"Wired connection 1\" ipv4.addresses \"10.0.0.220\/24, 10.0.0.221\/24, 10.0.0.222\/24\" ipv4.method manual<\/strong><\/pre>\n<p>&nbsp;<\/p>\n<p><strong>Step 3:<\/strong><\/p>\n<p>When you have finished updating the network settings on your Raspberry Pi, you can restart the network connection with the following command.<\/p>\n<pre class=\"cmd\"><strong>sudo nmcli c down \"Wired connection 1\" &amp;&amp; sudo nmcli c up \"Wired connection 1\"<\/strong><\/pre>\n<p>&nbsp;<\/p>\n<p><strong>Note:\u00a0<\/strong>If you are using SSH to connect to your Raspberry Pi, running the above command will cause the SSH session to end if the IP address changes.<\/p>\n<p>You can find all of the configuration settings for a network connection with the following command:<\/p>\n<pre class=\"cmd\"><strong>nmcli -p connection show \"Wired connection 1\"<\/strong><\/pre>\n<p>To change the network connection from static to automatic, run the following commands:<\/p>\n<pre class=\"cmd\"><strong>sudo nmcli con modify \"Wired connection 1\" ipv4.method auto\r\nsudo nmcli c down \"Wired connection 1\" &amp;&amp; sudo nmcli c up \"Wired connection 1\"<\/strong><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>[\ucd9c\ucc98] https:\/\/www.abelectronics.co.uk\/kb\/article\/31\/set-a-static-ip-address-on-raspberry-pi-os-bookworm &nbsp; This tutorial details how to set up a static network IP address on the Ethernet or WiFi connection\u00a0on the Raspberry Pi OS Bookworm image, released October 2023, from\u00a0https:\/\/www.raspberrypi.org\/software\/operating-systems\/. With the release of Raspberry Pi OS Bookworm, networking on the Raspberry Pi was changed to use NetworkManager as the standard controller for networking, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-875","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.fsquare.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/875","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.fsquare.co.kr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.fsquare.co.kr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.fsquare.co.kr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.fsquare.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=875"}],"version-history":[{"count":2,"href":"https:\/\/www.fsquare.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/875\/revisions"}],"predecessor-version":[{"id":877,"href":"https:\/\/www.fsquare.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/875\/revisions\/877"}],"wp:attachment":[{"href":"https:\/\/www.fsquare.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=875"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.fsquare.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=875"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.fsquare.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=875"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}