[docs]: Questions About Route Configuration
Documentation request
I use the following routing configuration: https://cloudinit.readthedocs.io/en/latest/reference/network-config-format-v1.html#route-example
dev name and mac_address match the one in my environment, not the one in the example. However, the route in the example cannot be queried.
I get 192.168.23.0/24, not 192.168.24.0/24. Why is that?
That example would only work if the route was added as an "onlink" route (a "normal" route requires the gateway to have an IP address in the machine's subnet).
Which distro, which cloud-init version, and which cloud-init network renderer are you using?
Only the netplan and networkd renderers appear to support "onlink".
That example would only work if the route was added as an "onlink" route (a "normal" route requires the gateway to have an IP address in the machine's subnet).
Which distro, which cloud-init version, and which cloud-init network renderer are you using?
Only the netplan and networkd renderers appear to support "onlink".
I get it,Thanks
distro: openEuler cloud-init version:23.4.1 cloud-init network renderer:sysconfig
https://cloudinit.readthedocs.io/en/latest/reference/network-config-format-v1.html#nameserver-example
network:
version: 1
config:
- type: physical
name: interface0
mac_address: '00:11:22:33:44:55'
subnets:
- type: static
address: 192.168.23.14/27
gateway: 192.168.23.1
- type: nameserver
interface: interface0 # Ties nameserver to interface0 only
address:
- 192.168.23.2
- 8.8.8.8
search:
- exemplary
Is this supported by some network renderers? I test it and the cloud-init command is successfully executed, but the nameserver information cannot be found.
The example does not specify which network renderers are supported. The cloud-init execution logs do not contain information such as unsupported or error information.
I'm sorry, but I'd like to ask. Where can I find this explanation? Thanks.
https://cloudinit.readthedocs.io/en/latest/reference/network-config-format-v1.html#nameserver-example
network: version: 1 config: - type: physical name: interface0 mac_address: '00:11:22:33:44:55' subnets: - type: static address: 192.168.23.14/27 gateway: 192.168.23.1 - type: nameserver interface: interface0 # Ties nameserver to interface0 only address: - 192.168.23.2 - 8.8.8.8 search: - exemplaryIs this supported by some network renderers? I test it and the cloud-init command is successfully executed, but the nameserver information cannot be found.
https://github.com/canonical/cloud-init/blob/main/cloudinit/distros/networking.py#L268 https://github.com/canonical/cloud-init/blob/main/cloudinit/net/init.py#L588 I looked at the code and found that the "type" configuration only seems to support "physical."