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

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

ライセンス:本記事のテキスト/コードは特記なき限り CC BY 4.0 です。引用の際は出典URL(本ページ)を明記してください。
利用ポリシー もご参照ください。

コメント

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