Difference between revisions of "Netplan examples"

From wikieduonline
Jump to navigation Jump to search
Tags: Mobile web edit, Mobile edit
Line 4: Line 4:
 
== Static [[IP]] configuration ==
 
== Static [[IP]] configuration ==
  
<pre>
+
 
network:
+
network:
  renderer: networkd
+
  renderer: networkd
  ethernets:
+
  ethernets:
    eno1:
+
    eno1:
      addresses:
+
      addresses:
        - 10.10.10.xx/24
+
          - 10.10.10.xx/24
      gateway4: 10.10.xx.1
+
      gateway4: 10.10.xx.1
      nameservers:
+
      [[nameservers]]:
        search: your_domain.com
+
        search: your_domain.com
        addresses: 8.8.8.8, 1.1.1.1
+
        addresses: 8.8.8.8, 1.1.1.1
  version: 2
+
  version: 2
</pre>
+
 
  
 
== [[DHCP]] configuration ==
 
== [[DHCP]] configuration ==

Revision as of 12:36, 25 February 2021


Static IP configuration

network:
  renderer: networkd
  ethernets:
    eno1:
      addresses:
         - 10.10.10.xx/24
      gateway4: 10.10.xx.1
      nameservers:
        search: your_domain.com
        addresses: 8.8.8.8, 1.1.1.1
  version: 2


DHCP configuration

Minimal configuration file:

network:
    ethernets:
        eno0:
            dhcp4: true


network:
    ethernets:
        eth0:
            dhcp4: true
            match:
                macaddress: dc:a6:32:2c:9f:33
            set-name: eth0
    version: 2


See also

Advertising: