diff options
author | Wen Liang <liangwen12year@gmail.com> | 2021-08-05 07:44:05 -0400 |
---|---|---|
committer | Wen Liang <liangwen12year@gmail.com> | 2021-08-09 09:35:52 -0400 |
commit | 778e1f8493babb8e015e5334806de7099c66bafb (patch) | |
tree | 178c9cd51da07b79c185d905fe5ac839a64cef76 /man | |
parent | f43bee77d6bbdd5f56995b88f46f2a64f8712948 (diff) | |
download | NetworkManager-778e1f8493babb8e015e5334806de7099c66bafb.tar.gz |
aliyun: reuse ipv4 gateway address returned by metadata server
The default ipv4 gateway address of the VPC in Aliyun cloud is not the
first IP address in the CIDR subnet block, we should instead use the
ipv4 gateway address retrieved from the metadata server in
`_nmc_mangle_connection()`.
https://bugzilla.redhat.com/show_bug.cgi?id=1823315
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/958
Signed-off-by: Wen Liang <liangwen12year@gmail.com>
Diffstat (limited to 'man')
-rw-r--r-- | man/nm-cloud-setup.xml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/man/nm-cloud-setup.xml b/man/nm-cloud-setup.xml index 63a805eb6b..7493cc1d7f 100644 --- a/man/nm-cloud-setup.xml +++ b/man/nm-cloud-setup.xml @@ -410,8 +410,8 @@ ln -s /etc/systemd/system/timers.target.wants/nm-cloud-setup.timer /usr/lib/syst <listitem> <para>Choose a route table 30400 + the index of the interface and add a default route <literal>0.0.0.0/0</literal>. The gateway - is the first IP address in the CIDR subnet block. For - example, we might get a route <literal>"0.0.0.0/0 10.0.0.1 10 table=30400"</literal>.</para> + is the default gateway retrieved from metadata server. For + example, we might get a route <literal>"0.0.0.0/0 10.0.0.253 10 table=30400"</literal>.</para> </listitem> <listitem> <para>Finally, add a policy routing rule for each address. For example @@ -419,7 +419,7 @@ ln -s /etc/systemd/system/timers.target.wants/nm-cloud-setup.timer /usr/lib/syst </listitem> </itemizedlist> With above example, this roughly corresponds for interface <literal>eth0</literal> to - <command>nmcli device modify "eth0" ipv4.addresses "10.0.0.150/24,10.0.0.150/24" ipv4.routes "0.0.0.0/0 10.0.0.1 10 table=30400" ipv4.routing-rules "priority 30400 from 10.0.0.150/32 table 30400, priority 30400 from 10.0.0.152/32 table 30400"</command>. + <command>nmcli device modify "eth0" ipv4.addresses "10.0.0.150/24,10.0.0.152/24" ipv4.routes "0.0.0.0/0 10.0.0.253 10 table=30400" ipv4.routing-rules "priority 30400 from 10.0.0.150/32 table 30400, priority 30400 from 10.0.0.152/32 table 30400"</command>. Note that this replaces the previous addresses, routes and rules with the new information. But also note that this only changes the run time configuration of the device. The connection profile on disk is not affected. |