LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-15-2019, 02:15 PM   #1
czezz
Member
 
Registered: Nov 2004
Distribution: Slackware/Solaris
Posts: 924

Rep: Reputation: 43
cloud-init network configuration?


Hi everyone,
I am trying to sort out how cloud-init configures network interfaces.

In freshly installed Ubuntu on raspberry this is what I see:
Code:
root@ubuntu:/etc# cat /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:
    version: 2
    ethernets:
        eth0:
            dhcp4: true
            match:
                macaddress: bf:ff:ff:ff:ff:ff
            set-name: eth0
Now, where or what tells system to setup my network as DHCP?
I see no entry about that in: /etc/cloud/cloud.cfg
 
Old 05-15-2019, 07:59 PM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
I guess it's this line:
Code:
dhcp4: true
Since no renderer is specified, netplan uses the default systemd-networkd to put this into effect. You could configure NetworkManager instead. See https://netplan.io/reference.

But perhaps I misunderstand your question?

Last edited by berndbausch; 05-15-2019 at 08:01 PM.
 
Old 05-16-2019, 01:10 AM   #3
czezz
Member
 
Registered: Nov 2004
Distribution: Slackware/Solaris
Posts: 924

Original Poster
Rep: Reputation: 43
Hi Berndbausch, thanks for reply but that is not exactly what I am asking for.
File: /etc/netplan/50-cloud-init.yaml has been generated automatically by cloud-init and after every reboot it will be generated from scratch (unless changed with netplan apply).

My question is:
where in cloud-init configuration files can I find initial/default settings for /etc/netplan/50-cloud-init.yaml ?

Code:
root@ubuntu:/etc# cat /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.
By looking for "datasource" I have found it in these files but there is not a single string saying about network configuration, dhcp, etc...
Its very interesting how did it come up to create 50-cloud-init.yaml in a form as it is.
Code:
/etc/cloud/cloud.cfg.d/99-fake_cloud.cfg:datasource_list: [ NoCloud, None ]
/etc/cloud/cloud.cfg.d/90_dpkg.cfg:datasource_list: [ NoCloud, ConfigDrive, OpenNebula, DigitalOcean, Azure, AltCloud, OVF, MAAS, GCE, OpenStack, CloudSigma, SmartOS, Bigstep, Scaleway, AliYun, Ec2, CloudStack, Hetzner, IBMCloud, None ]
/var/lib/cloud/data/result.json:  "datasource": "DataSourceNoCloud [seed=/var/lib/cloud/seed/nocloud-net][dsmode=net]",
/var/lib/cloud/data/status.json:  "datasource": "DataSourceNoCloud [seed=/var/lib/cloud/seed/nocloud-net][dsmode=net]",

Last edited by czezz; 05-16-2019 at 01:19 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Cloud 5: Dispelling cloud myths, the cloud security excuse, and the fight for cloud supremacy LXer Syndicated Linux News 0 06-20-2014 04:12 PM
LXer: Cloud 5: NSA not killing cloud, cloud IT jobs, rise of cloud brokers LXer Syndicated Linux News 0 03-02-2014 09:51 AM
LXer: Cloud 5: Netflix's cloud-connected brain, 5 cloud myths and from cloud to fog LXer Syndicated Linux News 0 02-21-2014 02:20 PM
LXer: It's a cloud, cloud, cloud, cloud world LXer Syndicated Linux News 0 07-23-2013 05:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration