ubuntu network config / netplan

علی ذوالفقار
1399/04/23 07:32:20 (815)
config file can be located in : /etc/netplan/01-netcfg.yaml config is moething like this :
# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
  version: 2
  renderer: networkd
  ethernets:
    ens32:
      addresses: [ 192.168.0.72/22]
      gateway4: 192.168.0.171
      nameservers:
          search: [ mydomain.com ]
          addresses:
              - "8.8.8.8"
apply changes with : sudo netplan apply this is a sample for config :
network:
  ethernets:
    ensXX:
      addresses:
      - XXX.XXX.XXX.XX/XX
      routes:
      - to: default
        via: YOUR_GATEWAY
      nameservers:
        addresses:
        - YOUR_MAIN_DNS_IP
        - OTHER_DNS_IPS
        search:
        - MACHINE_DOMAIN_NAME
  version: 2
Back