Difference between revisions of "Netplan examples"

From wikieduonline
Jump to navigation Jump to search
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
[[Netplan]] examples,  https://netplan.io/examples
 
[[Netplan]] examples,  https://netplan.io/examples
  
  [[/usr/share/]]doc/netplan/examples/
+
  [[/usr/share/doc/netplan/examples/]]
Check [[static.yaml]] for a simple example.
+
Check <code>[[static.yaml]]</code> for a simple example.
  
 
  bonding.yaml
 
  bonding.yaml
Line 8: Line 8:
 
  bridge.yaml
 
  bridge.yaml
 
  bridge_vlan.yaml
 
  bridge_vlan.yaml
  dhcp.yaml
+
  [[dhcp.yaml]]
 
  dhcp_wired8021x.yaml
 
  dhcp_wired8021x.yaml
 
  direct_connect_gateway.yaml
 
  direct_connect_gateway.yaml
Line 27: Line 27:
 
  windows_dhcp_server.yaml
 
  windows_dhcp_server.yaml
 
  wireguard.yaml
 
  wireguard.yaml
  wireless.yaml
+
  [[wireless.yaml]]
  wpa_enterprise.yaml
+
  [[wpa_enterprise.yaml]]
  
  
 
== Static [[IP]] configuration ==
 
== Static [[IP]] configuration ==
 
 
 
  network:
 
  network:
   renderer: networkd
+
   [[renderer:]] networkd
 
   ethernets:
 
   ethernets:
 
     eno1:
 
     eno1:
Line 42: Line 40:
 
       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
 
  
 
== [[DHCP]] configuration ==
 
== [[DHCP]] configuration ==
 
Minimal configuration file:
 
Minimal configuration file:
<pre>
+
 
network:
+
network:
    ethernets:
+
    ethernets:
        eno0:
+
        [[eno0]]:
            dhcp4: true
+
            dhcp4: true
</pre>
 
  
  
Line 67: Line 63:
 
     version: 2
 
     version: 2
 
</pre>
 
</pre>
 
 
  
 
== See also ==
 
== See also ==

Latest revision as of 11:43, 6 May 2021

Netplan examples, https://netplan.io/examples

/usr/share/doc/netplan/examples/

Check static.yaml for a simple example.

bonding.yaml
bonding_router.yaml
bridge.yaml
bridge_vlan.yaml
dhcp.yaml
dhcp_wired8021x.yaml
direct_connect_gateway.yaml
direct_connect_gateway_ipv6.yaml
ipv6_tunnel.yaml
loopback_interface.yaml
modem.yaml
network_manager.yaml
openvswitch.yaml
route_metric.yaml
source_routing.yaml
sriov.yaml
sriov_vlan.yaml
static.yaml
static_multiaddress.yaml
static_singlenic_multiip_multigateway.yaml
vlan.yaml
windows_dhcp_server.yaml
wireguard.yaml
wireless.yaml
wpa_enterprise.yaml


Static IP configuration[edit]

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[edit]

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[edit]

Advertising: