User Tools

Site Tools


linux:cloud-init:network_config

Static network config

Tryed setups:

network:
  version: 1
  config:
    subnets:
        - type: static
        address: 10.50.84.52/22
        gateway: 10.50.84.1
        dns_nameservers:
            - 10.40.3.101
            - 10.40.3.102
        dns_search:
            - ciberterminal.net
    - type: physical
      name: eth0
network:
  version: 1
  config:
    - type: physical
      name: eth0
      mac_address: 00:11:22:33:44:55
      subnets:
        - type: static
          address: 10.50.84.52/22
          gateway: 10.50.84.1
          dns_nameservers:
            - 10.40.3.101
            - 10.40.3.102
          dns_search:
            - ciberterminal.net
network-interfaces: |
  iface eth0 inet static
  address 10.50.84.52
  network 10.50.84.52
  netmask 255.255.252.0
  broadcast 10.50.87.255
  gateway 10.50.84.1
bootcmd:
  - ifdown eth0
  - ifup eth0
network:
  version: 2
  ethernets:
    # opaque ID for physical interfaces, only referred to by other stanzas
    eth0:
      addresses:
        - 10.50.84.52/22
      gateway4: 10.50.84.1
      nameservers:
        search: [ciberterminal.net, crypta.local]
        addresses: [10.40.3.101, 10.40.3.102]
 
linux/cloud-init/network_config.txt · Last modified: 2022/02/11 11:36 by 127.0.0.1