netplanの設定例(有線LAN,無線LAN)

Linux・CLI・DevOpsカテゴリを表すパンダのイラスト Linux・CLI・DevOps

netplanの設定例

papanda925@papandaSV:/etc/netplan$ cat 50-cloud-init.yaml 
# This file is generated from information provided by the datasource.  Changes
# to it will not persist across an instance reboot.  To disable cloud-init's
# network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
    ethernets:
        eth0:
            dhcp4: true
            optional: true
            dhcp-identifier: mac
    wifis:
        wlan0:
            dhcp4: true
            optional: true
            dhcp-identifier: mac
            access-points:
                SSIDを設定:
                    password: パスワードを設定

    version: 2

DHCPサーバにMACアドレスを通知させるための設定がこれ

我が家のAtermでは、ubuntuを固定IPにするには必須だった。

dhcp-identifier: mac

無線LANについてはこちら SSID名 と パスワードを無線LAN機器から確認に設定する。

    wifis:
        wlan0:
            dhcp4: true
            optional: true
            dhcp-identifier: mac
            access-points:
                SSID名:
                    password: パスワードを設定

最後に有効化

sudo netplan apply

文書情報

記事タイトル
netplanの設定例(有線LAN,無線LAN)
作成日
更新日
Source URL
https://papanda925.com/?p=698

ライセンス: 本記事のうち、当サイトが権利を有する本文・自作図表は、特記なき限り CC BY 4.0 で利用できます。生成AIを活用して作成・編集した内容を含みます。コードについて、別途ライセンス表示またはリンク先GitHubリポジトリのライセンスがある場合は、その条件を優先します。引用・第三者資料・画像・商標等は本ライセンスの対象外です。 利用ポリシー

タイトルとURLをコピーしました