Netplan

Iš Žinynas.
Jump to navigation Jump to search

NetPlan Koks tai šetoniškas tinklo valdymo frameworkas sugalvotas utumbu kreivaloperių...


Bridge nustatymai[keisti]

Sumetam į /etc/netplan/50-cloud-init.yaml

# This file is generated from information provided by
# the datasource.  Changes to it will not persist across an instance.
# To disable cloud-init's network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
    ethernets:
        eth0:
            dhcp4: true
            nameservers:
             addresses: [1.1.1.1,8.8.8.8]
        eth1:
            dhcp4: no
            dhcp6: no
    version: 2
    bridges:
         br0:
            interfaces: [eth1]
            addresses: [192.168.12.1/24]
            parameters:
             stp: true
             forward-delay: 4
            dhcp4: no
            dhcp6: no
  • eth0 yra išeinantis interneto intefeisas, nustatytas, kad pasigautų dhcp nustatymus.
  • eth0 sudedam į br0 (bridge), uždedam jam statinį ip ir toliau viską paliekam isc-dhcp-server daemonui.

Patikriname ir įgaliname konfigūraciją:

netplan generate
netplan apply