Netplan Basic Ubuntu 23.04 Static IP Setup: Difference between revisions
From WikiMLT
mNo edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
<noinclude>{{ContentArticleHeader/Linux_Server|toc=off}}{{ContentArticleHeader/Linux_Desktop}}</noinclude> | <noinclude>{{ContentArticleHeader/Linux_Server|toc=off}}{{ContentArticleHeader/Linux_Desktop}}</noinclude><syntaxhighlight lang="shell" line="1"> | ||
== | sudo nano /etc/netplan/00-installer-config.yaml | ||
</syntaxhighlight><syntaxhighlight lang="yaml" line="1"> | |||
# This is the network config written by 'pa4080' | |||
network: | |||
ethernets: | |||
eth0: | |||
addresses: | |||
- 172.16.1.110/24 | |||
match: | |||
macaddress: ae:14:53:6b:48:a5 | |||
nameservers: | |||
addresses: | |||
- 172.16.1.10 | |||
- 172.16.1.1 | |||
search: | |||
- ububtu-x.metalevel.cloud | |||
routes: | |||
- to: default | |||
via: 172.16.1.1 | |||
set-name: eth0 | |||
version: 2 | |||
</syntaxhighlight>References: | |||
* ... | * Ask Ubuntu: [https://askubuntu.com/questions/1260951/what-is-the-difference-between-00-installer-config-yaml-and-50-cloud-init-yam What is the difference between <code>00-installer-config.yaml</code> and <code>50-cloud-init.yaml</code>] | ||
* Linux Config: [https://linuxconfig.org/how-to-configure-static-ip-address-on-ubuntu-18-04-bionic-beaver-linux Netplan static IP on Ubuntu configuration] | |||
<noinclude> | <noinclude> |
Revision as of 10:06, 6 May 2023
sudo nano /etc/netplan/00-installer-config.yaml
# This is the network config written by 'pa4080'
network:
ethernets:
eth0:
addresses:
- 172.16.1.110/24
match:
macaddress: ae:14:53:6b:48:a5
nameservers:
addresses:
- 172.16.1.10
- 172.16.1.1
search:
- ububtu-x.metalevel.cloud
routes:
- to: default
via: 172.16.1.1
set-name: eth0
version: 2
References:
- Ask Ubuntu: What is the difference between
00-installer-config.yaml
and50-cloud-init.yaml
- Linux Config: Netplan static IP on Ubuntu configuration