network:
  version: 2
  # if specified, can only realistically have that value, as networkd cannot
  # render wifi/3G. This would be shipped as a separate snippet by desktop images.
  #renderer: NetworkManager
  ethernets:
    # opaque ID for physical interfaces, only referred to by other stanzas
    id0:
      match:
        macaddress: 00:11:22:33:44:55
      wakeonlan: true
      dhcp4: true
      addresses:
        - 192.168.14.2/24
        - "2001:1::1/64"
      gateway4: 192.168.14.1
      gateway6: "2001:1::2"
      routes:
       - to: 11.22.0.0/16
         via: 192.168.14.3
         metric: 100
      nameservers:
        search: [foo.local, bar.local]
        addresses: [8.8.8.8]
    lom:
      match:
        driver: ixgbe
      # you are responsible for setting tight enough match rules
      # that only match one device if you use set-name
      set-name: lom1
      dhcp6: true
    switchports:
      # all cards on second PCI bus; unconfigured by themselves, will be added
      # to br0 below (note: globbing is not supported by NetworkManager)
      match:
        name: enp2*
      mtu: 1280
  wifis:
    all-wlans:
      # useful on a system where you know there is only ever going to be one device
      match: {}
      access-points:
        "Joe's home":
          # mode defaults to "managed" (client)
          password: "s3kr1t"
    # this creates an AP on wlp1s0 using hostapd; no match rules, thus ID is
    # the interface name
    wlp1s0:
      access-points:
        "guest":
           mode: ap
           # no WPA config implies default of open
  bridges:
    # the key name is the name for virtual (created) interfaces; no match: and
    # set-name: allowed
    br0:
      # IDs of the components; switchports expands into multiple interfaces
      interfaces: [wlp1s0, switchports]
      dhcp4: true
