diff options
| author | Sebastien Bacher <seb128@ubuntu.com> | 2021-08-25 15:23:22 +0200 |
|---|---|---|
| committer | Sebastien Bacher <seb128@ubuntu.com> | 2021-08-25 15:23:22 +0200 |
| commit | cfb80376641fa49137b9996130352697e7f8b436 (patch) | |
| tree | 4ac3eb90a08f27a8bff2372052f8ae78f7e7c3aa /man/nm-cloud-setup.8 | |
| parent | 35779c6675728fa6f0fd0a21cefb904408509c23 (diff) | |
New upstream version 1.32.10
Diffstat (limited to 'man/nm-cloud-setup.8')
| -rw-r--r-- | man/nm-cloud-setup.8 | 123 |
1 files changed, 120 insertions, 3 deletions
diff --git a/man/nm-cloud-setup.8 b/man/nm-cloud-setup.8 index 6d4f7d44..e33f6a87 100644 --- a/man/nm-cloud-setup.8 +++ b/man/nm-cloud-setup.8 @@ -2,12 +2,12 @@ .\" Title: nm-cloud-setup .\" Author: .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/> -.\" Date: 06/30/2021 +.\" Date: 08/18/2021 .\" Manual: Automatic Network Configuration in Cloud with NetworkManager -.\" Source: NetworkManager 1.32.2 +.\" Source: NetworkManager 1.32.10 .\" Language: English .\" -.TH "NM\-CLOUD\-SETUP" "8" "" "NetworkManager 1\&.32\&.2" "Automatic Network Configuratio" +.TH "NM\-CLOUD\-SETUP" "8" "" "NetworkManager 1\&.32\&.10" "Automatic Network Configuratio" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -157,6 +157,18 @@ no\&. NM_CLOUD_SETUP_GCP: boolean, whether Google GCP support is enabled\&. Defaults to no\&. .RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +NM_CLOUD_SETUP_ALIYUN: boolean, whether Alibaba Cloud (Aliyun) support is enabled\&. Defaults to +no\&. +.RE .SH "EXAMPLE SETUP FOR CONFIGURING AND PREDEPLOYING NM\-CLOUD\-SETUP" .PP As detailed before, nm\-cloud\-setup needs to be explicitly enabled\&. As it runs as a systemd service and timer, that basically means to enable and configure those\&. This can be done by dropping the correct files and symlinks to disk\&. @@ -463,6 +475,111 @@ The effect is not unlike calling \fBnmcli device modify "$DEVICE" ipv4\&.addresses "$ADDR/$SUBNET [,\&.\&.\&.]" ipv4\&.routes "$ADDR/32 $GATEWAY 10 table=$TABLE" ipv4\&.routing\-rules "priority $TABLE from $ADDR/32 table $TABLE"\fR for all relevant devices and all found addresses\&. .RE +.SS "Alibaba Cloud (Aliyun)" +.PP +For Aliyun, the tools tries to fetch configuration from +http://100\&.100\&.100\&.200/\&. Currently, it only configures IPv4 and does nothing about IPv6\&. It will do the following\&. +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +First fetch +http://100\&.100\&.100\&.200/2016\-01\-01/meta\-data/ +to determine whether the expected API is present\&. This determines whether Aliyun environment is detected and whether to proceed to configure the host using Aliyun meta data\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Fetch +http://100\&.100\&.100\&.200/2016\-01\-01/meta\-data/network/interfaces/macs/ +to get the list of available interface\&. Interfaces are identified by their MAC address\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Then for each interface fetch +http://100\&.100\&.100\&.200/2016\-01\-01/meta\-data/network/interfaces/macs/$MAC/vpc\-cidr\-block +, +http://100\&.100\&.100\&.200/2016\-01\-01/meta\-data/network/interfaces/macs/$MAC/private\-ipv4s +and +http://100\&.100\&.100\&.200/2016\-01\-01/meta\-data/network/interfaces/macs/$MAC/netmask\&. Thereby we get a list of private IPv4 addresses, one CIDR subnet block and private IPv4 addresses prefix\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Then nm\-cloud\-setup iterates over all interfaces for which it could fetch IP configuration\&. If no ethernet device for the respective MAC address is found, it is skipped\&. Also, if the device is currently not activated in NetworkManager or if the currently activated profile has a user\-data +org\&.freedesktop\&.nm\-cloud\-setup\&.skip=yes, it is skipped\&. +.sp +Then, the tool will change the runtime configuration of the device\&. +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Add static IPv4 addresses for all the configured addresses from +private\-ipv4s +with prefix length according to +netmask\&. For example, we might have here 2 IP addresses like +"10\&.0\&.0\&.150/24,10\&.0\&.0\&.152/24"\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Choose a route table 30400 + the index of the interface and add a default route +0\&.0\&.0\&.0/0\&. The gateway is the default gateway retrieved from metadata server\&. For example, we might get a route +"0\&.0\&.0\&.0/0 10\&.0\&.0\&.253 10 table=30400"\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Finally, add a policy routing rule for each address\&. For example +"priority 30400 from 10\&.0\&.0\&.150/32 table 30400, priority 30400 from 10\&.0\&.0\&.152/32 table 30400"\&. +.RE +.sp +With above example, this roughly corresponds for interface +eth0 +to +\fBnmcli 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"\fR\&. 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\&. +.RE .SH "SEE ALSO" .PP \fBNetworkManager\fR(8) |