<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>static  |  塞翁失馬</title>
	<atom:link href="https://hbirds.mydns.jp/tag/static/feed/" rel="self" type="application/rss+xml" />
	<link>https://hbirds.mydns.jp</link>
	<description>禍福は糾える縄の如し</description>
	<lastBuildDate>Tue, 17 Jan 2023 21:34:44 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.6.2</generator>

<image>
	<url>https://hbirds.mydns.jp/wp-content/uploads/2022/12/cropped-akaza-32x32.png</url>
	<title>static  |  塞翁失馬</title>
	<link>https://hbirds.mydns.jp</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>サーバーのIPアドレスの固定</title>
		<link>https://hbirds.mydns.jp/%e3%82%b5%e3%83%bc%e3%83%90%e3%83%bc%e3%81%aeip%e3%82%a2%e3%83%89%e3%83%ac%e3%82%b9%e3%81%ae%e5%9b%ba%e5%ae%9a/</link>
		
		<dc:creator><![CDATA[hbirds]]></dc:creator>
		<pubDate>Tue, 17 Jan 2023 21:17:07 +0000</pubDate>
				<category><![CDATA[Server]]></category>
		<category><![CDATA[ip]]></category>
		<category><![CDATA[nic]]></category>
		<category><![CDATA[static]]></category>
		<guid isPermaLink="false">http://hbirds.mydns.jp/?p=642</guid>

					<description><![CDATA[Ubuntu22.04LTSサーバーのIPアドレスを固定する。 現状は以下のようになっている。 新たに以下の 01-netcfg.yaml ファイルを作成して有効化(sudo netplan apply)する。 自分はNICが２つあるので１つ(ens17s0)は固定(192.168.0.99)、もう１つ(ens1)は dhcp:true としてみた。]]></description>
										<content:encoded><![CDATA[
<p>Ubuntu22.04LTSサーバーのIPアドレスを固定する。</p>



<p>現状は以下のようになっている。</p>



<pre class="wp-block-code terminal"><code>birds@ml115g5ubuntu2204server:/etc/netplan$ cat 00-installer-config.yaml
# This is the network config written by 'subiquity'
network:
  ethernets:
    enp17s0:
      dhcp4: true
    ens1:
      dhcp4: true
  version: 2
</code></pre>



<pre class="wp-block-code"><code>これを、以下で無効化して</code></pre>



<pre class="wp-block-code terminal"><code>hbirds@ml115g5ubuntu2204server:/etc/netplan$ sudo mv 00-installer-config.yaml 00-installer-config.yaml.bak</code></pre>



<p>新たに以下の 01-netcfg.yaml ファイルを作成して有効化(sudo netplan apply)する。</p>



<p>自分はNICが２つあるので１つ(ens17s0)は固定(192.168.0.99)、もう１つ(ens1)は dhcp:true としてみた。</p>



<pre class="wp-block-code terminal"><code>network:
  ethernets:
    # ネットワークインターフェース名
    enp17s0:
      dhcp4: false
      # IP アドレス/サブネットマスク
      addresses: &#91;192.168.0.99/24]
      # デフォルトゲートウェイ
      # &#91;metric] : 優先度を設定 (複数の NIC 搭載の場合に指定)
      # 値が低い方が優先度高
      routes:
        - to: default
          via: 192.168.0.1
          metric: 100
      nameservers:
        # 参照するネームサーバー
        addresses: &#91;192.168.0.1]
      dhcp6: false
    ens1:
     dhcp4: true
     dhcp6: true
  version: 2</code></pre>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
