{"id":171,"date":"2026-04-05T18:31:24","date_gmt":"2026-04-05T09:31:24","guid":{"rendered":"https:\/\/falcon21.space\/kazuya\/work\/?page_id=171"},"modified":"2026-04-15T10:54:34","modified_gmt":"2026-04-15T01:54:34","slug":"nmcli-%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%97%e3%81%9f%e3%83%8d%e3%83%83%e3%83%88%e3%83%af%e3%83%bc%e3%82%af%e6%8e%a5%e7%b6%9a%e3%81%ae%e8%a8%ad%e5%ae%9a","status":"publish","type":"page","link":"https:\/\/falcon21.space\/kazuya\/work\/?page_id=171","title":{"rendered":"NMCLI \u3092\u4f7f\u7528\u3057\u305f\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u63a5\u7d9a\u306e\u8a2d\u5b9a"},"content":{"rendered":"\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>1.&nbsp;<strong>NetworkManager \u63a5\u7d9a\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u3092\u30ea\u30b9\u30c8\u3057\u307e\u3059\u3002<\/strong><br><br>[root@falcon21 ~]# <strong>nmcli connection show<\/strong><br>NAME \u3000\u3000\u3000\u3000\u3000\u3000UUID \u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000TYPE \u3000\u3000\u3000EVICE<br>\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb 1 \u3000xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \u3000    <strong>ethernet<\/strong> \u3000<strong>enp2s0<\/strong><br>lo \u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \u3000loopback \u3000\u3000lo<\/p>\n\n\n\n<p>\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u3001NetworkManager \u306f\u30db\u30b9\u30c8\u5185\u306e\u5404 NIC \u306e\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<br>\u3053\u306e NIC \u3092\u7279\u5b9a\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306b\u306e\u307f\u63a5\u7d9a\u3059\u308b\u4e88\u5b9a\u304c\u3042\u308b\u5834\u5408\u306f\u3001\u81ea\u52d5\u4f5c\u6210\u3055\u308c\u305f\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u3092<br>\u8abf\u6574\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br>\u3053\u306e NIC \u3092\u3055\u307e\u3056\u307e\u306a\u8a2d\u5b9a\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306b\u63a5\u7d9a\u3059\u308b\u4e88\u5b9a\u304c\u3042\u308b\u5834\u5408\u306f\u3001 \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3054\u3068\u306b\u500b\u5225\u306e<br>\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br><br>2.&nbsp;<strong>\u8ffd\u52a0\u306e\u63a5\u7d9a\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3059\u308b\u5834\u5408\u306f\u3001\u6b21\u306e\u3088\u3046\u306b\u5b9f\u884c\u3057\u307e\u3059\u3002<\/strong><br><br>[root@falcon21 ~]#&nbsp;<strong>nmcli connection add con-name&nbsp;ifname&nbsp;type ethernet<\/strong><br>\u63a5\u7d9a &#8216;<strong>ifname<\/strong>&#8216; (cd5d213d-726f-45a0-a8b1-d7c9652d9795) \u304c\u6b63\u5e38\u306b\u8ffd\u52a0\u3055\u308c\u307e\u3057\u305f\u3002<br><br>\u3000\u3000\u65e2\u5b58\u306e\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u3092\u5909\u66f4\u3059\u308b\u306b\u306f\u3001\u3053\u306e\u624b\u9806\u3092\u30b9\u30ad\u30c3\u30d7\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br><br>3.&nbsp;<strong>\u30aa\u30d7\u30b7\u30e7\u30f3: \u63a5\u7d9a\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u306e\u540d\u524d\u3092\u5909\u66f4\u3057\u307e\u3059\u3002<\/strong><br>\u3000\u3000\u3000\u3000<strong>\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb 1<\/strong>\u3000\u3092\u3000<strong>Internal-LAN<\/strong>\u3000\u306b\u5909\u66f4<br>[root@falcon21 ~]#&nbsp;<strong>nmcli connection modify&nbsp;<\/strong>&#8220;<strong>\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb 1<\/strong>&#8221;&nbsp;<strong>connection.id<\/strong>&nbsp;&#8220;<strong>Internal-LAN<\/strong>&#8220;<br><br>\u30db\u30b9\u30c8\u306b\u8907\u6570\u306e\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u304c\u3042\u308b\u5834\u5408\u306f\u3001\u308f\u304b\u308a\u3084\u3059\u3044\u540d\u524d\u3092\u4ed8\u3051\u308b\u3068\u3001\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u306e\u76ee \u7684\u3092\u8b58\u5225\u3057\u3084\u3059\u304f\u306a\u308a\u307e\u3059\u3002<br>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br><br>4.&nbsp;<strong>\u63a5\u7d9a\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u306e\u73fe\u5728\u306e\u8a2d\u5b9a\u3092\u8868\u793a\u3057\u307e\u3059\u3002<\/strong><br>\u3000\u3000\u3000\u3000\u3000<strong>\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\u3000\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u8a2d\u5b9a\u3067\u3001ipv4 \u3092\u56fa\u5b9a\u3001ipv6 \u3092\u81ea\u52d5\u306b\u6307\u5b9a<\/strong><\/p>\n\n\n\n<p>[root@falcon21 ~]# <strong>nmcli connection show\u00a0Internal-LAN<\/strong><br><strong>connection.id: Internal-LAN<\/strong><br>connection.uuid: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx<br>connection.stable-id: &#8212;<br><strong>connection.type: 802-3-ethernet<\/strong><br><strong>connection.interface-name: enp2s0<\/strong><br><br>connection.wait-device-timeout: -1<br>connection.wait-activation-delay: -1<br>802-3-ethernet.port: &#8212;<br>802-3-ethernet.speed: 0<br><br>802-3-ethernet.wake-on-lan-password: &#8212;<br>802-3-ethernet.accept-all-mac-addresses:-1 (default)<br><strong>ipv4.method: manual<\/strong><br><strong>ipv4.dns: 192.168.10.1<\/strong><br>ipv4.dns-search: &#8212;<br>ipv4.dns-options: &#8212;<br>ipv4.dns-priority: 0<br><strong>ipv4.addresses: 192.168.10.3\/24<\/strong><br><strong>ipv4.gateway: 192.168.10.1<\/strong><br>ipv4.routes: &#8212;<br><br>ipv4.dhcp-send-hostname: -1 (default)<br>ipv4.dhcp-hostname: &#8212;<br>ipv4.dhcp-fqdn: &#8212;<br><br>ipv4.shared-dhcp-lease-time: 0 (default)<br><strong>ipv6.method: auto<\/strong><br>ipv6.dns: &#8212;<br>ipv6.dns-search: &#8212;<br>ipv6.dns-options: &#8212;<br>ipv6.dns-priority: 0<br>ipv6.token: &#8212;<br>proxy.method: none<br>proxy.browser-only: \u3044\u3044\u3048<br>proxy.pac-url: &#8212;<br>proxy.pac-script: &#8212;<br>GENERAL.NAME: Internal-LAN<br>GENERAL.UUID: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx<br>GENERAL.DEVICES: enp2s0<br>GENERAL.IP-IFACE: enp2s0<br>GENERAL.STATE: \u30a2\u30af\u30c6\u30a3\u30d9\u30fc\u30c8\u6e08\u307f<br>GENERAL.DEFAULT: \u306f\u3044<br><\/p>\n\n\n\n<p><strong>ipv6 \u3092\u81ea\u52d5\u306b\u6307\u5b9a\u3059\u308b\u3068\u3001DNS \u30b5\u30fc\u30d0\u30fc\u69cb\u7bc9\u3067\u30a8\u30e9\u30fc\u3068\u306a\u308b\u306e\u3067\u3001\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\u3000\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u8a2d\u5b9a\u3067 \u300c\u7121\u52b9\u300d\u306b\u6307\u5b9a<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[root@falcon21 ~]# <strong>nmcli connection show Internal-LAN<\/strong><br><strong>connection.id:                          Internal-LAN<\/strong><br>connection.uuid:                        xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx<br>connection.stable-id:                   --<br><strong>connection.type:                        802-3-ethernet<\/strong><br><br>802-3-ethernet.mtu:                     \u81ea\u52d5<br>802-3-ethernet.s390-subchannels:        --<br>802-3-ethernet.s390-nettype:            --<br>802-3-ethernet.s390-options:            --<br>802-3-ethernet.wake-on-lan:             default<br>802-3-ethernet.wake-on-lan-password:    --<br>802-3-ethernet.accept-all-mac-addresses:-1 (default)<br><strong>ipv4.method:                            manual<\/strong><br><strong>ipv4.dns:                               192.168.10.1<\/strong><br><strong>ipv4.dns-search:                        falcon21.space<\/strong><br>ipv4.dns-options:                       --<br>ipv4.dns-priority:                      0<br><strong>ipv4.addresses:                         192.168.10.3\/24<\/strong><br><strong>ipv4.gateway:                           192.168.10.1<\/strong><br>ipv4.routes:                            --<br>ipv4.route-metric:                      -1<br><br><strong>IP4.ADDRESS[1]:                         192.168.10.3\/24<br>IP4.GATEWAY:                            192.168.10.1<br>IP4.ROUTE[1]:                           dst = 0.0.0.0\/0, nh = 192.168.10.1, mt = 100<br>IP4.ROUTE[2]:                           dst = 192.168.10.0\/24, nh = 0.0.0.0, mt = 100<br>IP4.DNS[1]:                             192.168.10.1<br>IP4.SEARCHES[1]:                        falcon21.space<\/strong><br>IP6.GATEWAY:                            --<br><\/pre>\n\n\n\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br><br>5.&nbsp;<strong>IPv4 \u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/strong>\u3000\u3000\u3000<strong>IPv4 \u3092\u56fa\u5b9a\u8a2d\u5b9a\u306b\u3057\u305f\u306e\u3067\u3001\u3053\u308c\u306f\u30b9\u30ad\u30c3\u30d7<\/strong><br><br><strong>DHCP \u3092\u4f7f\u7528\u3059\u308b\u306b\u306f\u3001\u6b21\u306e\u3088\u3046\u306b\u5b9f\u884c\u3057\u307e\u3059\u3002<\/strong><br>[root@falcon21 ~]#&nbsp;<strong>nmcli connection modify Internal-LAN ipv4.method auto<\/strong><br><br>ipv4.method \u304c\u3059\u3067\u306b auto (\u30c7\u30d5\u30a9\u30eb\u30c8) \u306b\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u306f\u3001\u3053\u306e\u624b\u9806\u3092\u30b9\u30ad\u30c3\u30d7\u3057 \u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<p>&#8212;&#8212;&#8212;<\/p>\n\n\n\n<p><strong>\u9759\u7684 IPv4 \u30a2\u30c9\u30ec\u30b9\u3001\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30de\u30b9\u30af\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u30b2\u30fc\u30c8\u30a6\u30a7\u30a4\u3001DNS \u30b5\u30fc\u30d0\u30fc\u3001\u304a\u3088\u3073\u691c\u7d22\u30c9\u30e1\u30a4\u30f3\u3092\u8a2d\u5b9a\u3059\u308b\u306b\u306f\u3001\u6b21\u306e\u3088\u3046\u306b\u5b9f\u884c<\/strong><br><br>[root@falcon21 ~]#&nbsp;<strong>nmcli connection modify&nbsp;Internal-LAN&nbsp;ipv4.method manual ipv4.addresses&nbsp;192.168.10.3\/24&nbsp;ipv4.gateway&nbsp;192.168.10.1&nbsp;ipv4.dns&nbsp;192.168.10.\uff11&nbsp;ipv4.dns-search&nbsp;falcon21.space<\/strong><br><br><br>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br><br><br><br>6.<strong>&nbsp;IPv6 \u8a2d\u5b9a\u3092\u884c\u3044\u307e\u3059\u3002<\/strong><strong>IPv6\u306f\u7121\u52b9\u8a2d\u5b9a\u306b\u3057\u305f\u306e\u3067\u3001\u30b9\u30ad\u30c3\u30d7<\/strong><br><br><strong>\u30b9\u30c6\u30fc\u30c8\u30ec\u30b9\u30a2\u30c9\u30ec\u30b9\u81ea\u52d5\u8a2d\u5b9a (SLAAC) \u3092\u4f7f\u7528\u3059\u308b\u306b\u306f\u3001\u6b21\u306e\u3088\u3046\u306b\u5b9f\u884c<\/strong><br><br>[root@falcon21 ~]#&nbsp;<strong>nmcli connection modify Internal-LAN ipv6.method auto<\/strong><br><br>ipv6.method \u304c\u3059\u3067\u306b auto (\u30c7\u30d5\u30a9\u30eb\u30c8) \u306b\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u306f\u3001\u3053\u306e\u624b\u9806\u3092\u30b9\u30ad\u30c3\u30d7\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br><br><br>&#8212;&#8212;&#8212;-<br><br><strong>\u9759\u7684 IPv6 \u30a2\u30c9\u30ec\u30b9\u3001\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30de\u30b9\u30af\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u30b2\u30fc\u30c8\u30a6\u30a7\u30a4\u3001DNS \u30b5\u30fc\u30d0\u30fc\u3001\u304a \u3088\u3073\u691c\u7d22\u30c9\u30e1\u30a4\u30f3\u3092\u8a2d\u5b9a\u3059\u308b\u306b\u306f\u3001\u6b21\u306e\u3088\u3046\u306b\u5b9f<\/strong>\u884c<br><br>[root@falcon21 ~]#&nbsp;<strong>nmcli connection modify&nbsp;Internal-LAN&nbsp;ipv6.method manual <u>ipv6.addresses 2001:db8:1::fffe\/64 ipv6.gateway 2001:db8:1::fffe ipv6.dns 2001:db8:1::ffbb<\/u> ipv6.dns-search&nbsp;falcon21.space<\/strong><br><br><br>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br><br><br>7.&nbsp;<strong>\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u306e\u4ed6\u306e\u8a2d\u5b9a\u3092\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3059\u308b\u306b\u306f\u3001\u6b21\u306e\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528<\/strong><br><br>#&nbsp;<strong>nmcli connection modify<\/strong>&nbsp;connection-name&nbsp;setting&nbsp;value<br><br>\u5024\u306f\u30b9\u30da\u30fc\u30b9\u307e\u305f\u306f\u30bb\u30df\u30b3\u30ed\u30f3\u3067\u5f15\u7528\u7b26\u3067\u56f2\u307f\u307e\u3059\u3002<br><br><br>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br><br><br>8.&nbsp;<strong>\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u3092\u30a2\u30af\u30c6\u30a3\u30d6\u5316<\/strong><br><br>[root@falcon21 ~]#&nbsp;<strong>nmcli connection up&nbsp;Internal-LAN<\/strong><br>\u63a5\u7d9a\u304c\u6b63\u5e38\u306b\u30a2\u30af\u30c6\u30a3\u30d9\u30fc\u30c8\u3055\u308c\u307e\u3057\u305f<br>(D-Bus \u30a2\u30af\u30c6\u30a3\u30d6\u30d1\u30b9: \/org\/freedesktop\/NetworkManager\/ActiveConnection\/3)<\/p>\n\n\n\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br><br>[root@falcon21 ~]#&nbsp;<strong>reboot<\/strong><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1.&nbsp;NetworkManager \u63a5\u7d9a\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u3092\u30ea\u30b9\u30c8\u3057\u307e\u3059\u3002 [root@falcon21 ~]# nmcli connection showNAME \u3000\u3000\u3000\u3000\u3000\u3000UUID \u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-171","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/falcon21.space\/kazuya\/work\/index.php?rest_route=\/wp\/v2\/pages\/171","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/falcon21.space\/kazuya\/work\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/falcon21.space\/kazuya\/work\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/falcon21.space\/kazuya\/work\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/falcon21.space\/kazuya\/work\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=171"}],"version-history":[{"count":3,"href":"https:\/\/falcon21.space\/kazuya\/work\/index.php?rest_route=\/wp\/v2\/pages\/171\/revisions"}],"predecessor-version":[{"id":325,"href":"https:\/\/falcon21.space\/kazuya\/work\/index.php?rest_route=\/wp\/v2\/pages\/171\/revisions\/325"}],"wp:attachment":[{"href":"https:\/\/falcon21.space\/kazuya\/work\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=171"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}