Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: Updates routed nic how-to to use pass netplan config via stdin. #12207

Merged
merged 1 commit into from
Sep 4, 2023

Conversation

markylaing
Copy link
Contributor

No description provided.

@markylaing markylaing added the Documentation Documentation needs updating label Sep 1, 2023
@markylaing markylaing self-assigned this Sep 1, 2023
Copy link
Member

@tomponline tomponline left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

During my testing I discovered that the netplan config is creating link-local addresses on the VM's NIC. This prevents pinging the next-hop addresses on the host because the source address used is the link-local address and there is no return route on the host.

Lets lose the :

          link-local:
          - ipv4
          - ipv6

And instead add: on-link: true to the static routes instead.

@markylaing
Copy link
Contributor Author

During my testing I discovered that the netplan config is creating link-local addresses on the VM's NIC. This prevents pinging the next-hop addresses on the host because the source address used is the link-local address and there is no return route on the host.

Lets lose the :

          link-local:
          - ipv4
          - ipv6

And instead add: on-link: true to the static routes instead.

Ahh I didn't catch that when I was testing it. Just to be completely certain, is the following config what we want?

    cat <<EOF | lxc config set jammy cloud-init.network-config -
    network:
      version: 2
      ethernets:
        enp5s0:
          routes:
          - to: default
            via: 169.254.0.1
            on-link: true
          - to: default
            via: fe80::1
            on-link: true
          addresses:
          - 192.0.2.2/32
          - 2001:db8::2/128
    EOF

@tomponline
Copy link
Member

During my testing I discovered that the netplan config is creating link-local addresses on the VM's NIC. This prevents pinging the next-hop addresses on the host because the source address used is the link-local address and there is no return route on the host.
Lets lose the :

          link-local:
          - ipv4
          - ipv6

And instead add: on-link: true to the static routes instead.

Ahh I didn't catch that when I was testing it. Just to be completely certain, is the following config what we want?

    cat <<EOF | lxc config set jammy cloud-init.network-config -
    network:
      version: 2
      ethernets:
        enp5s0:
          routes:
          - to: default
            via: 169.254.0.1
            on-link: true
          - to: default
            via: fe80::1
            on-link: true
          addresses:
          - 192.0.2.2/32
          - 2001:db8::2/128
    EOF

Thats it! :)

@markylaing markylaing force-pushed the routed-nic-howto-heredoc branch from b190281 to eae3b0d Compare September 1, 2023 15:35
@markylaing
Copy link
Contributor Author

Thats it! :)

Ok done 👍

@markylaing markylaing force-pushed the routed-nic-howto-heredoc branch from eae3b0d to 0c84a21 Compare September 4, 2023 15:19
@tomponline tomponline merged commit b79d5b5 into canonical:main Sep 4, 2023
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Documentation needs updating
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants