NM.SettingIPConfig¶
- Subclasses:
Methods¶
- Inherited:
- Structs:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w |
|||
r/w/en |
|||
r/w/en |
|||
r/w/en |
|||
r/w/en |
|||
r/w/en |
|||
r/w/en |
|||
[ |
r/w/en |
||
r/w/en |
|||
r/w/en |
|||
r/w/en |
|||
[ |
r/w |
||
[ |
r/w/en |
||
r/w/en |
|||
[ |
r/w/en |
||
r/w/en |
|||
r/w/en |
|||
r/w/en |
|||
r/w/en |
|||
r/w/en |
|||
r/w/en |
|||
r/w/en |
|||
r/w/en |
|||
r/w/en |
|||
r/w/en |
|||
r/w |
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class NM.SettingIPConfig(**kwargs)¶
- Bases:
- Abstract:
Yes
- Structure:
- add_address(address)¶
- Parameters:
address (
NM.IPAddress
) – the new address to add- Returns:
True
if the address was added;False
if the address was already known.- Return type:
Adds a new IP address and associated information to the setting. The given address is duplicated internally and is not changed by this function.
- add_dhcp_reject_server(server)¶
- Parameters:
server (
str
) – the DHCP reject server to add
Adds a new DHCP reject server to the setting.
New in version 1.28.
- add_dns(dns)¶
- Parameters:
dns (
str
) – the IP address of the DNS server to add- Returns:
True
if the DNS server was added;False
if the server was already knownBefore 1.42, setting dns to an invalid string was treated as user-error. Now, also invalid DNS values can be set, but will be rejected later during
NM.Connection.verify
().- Return type:
Adds a new DNS server to the setting.
- add_dns_option(dns_option)¶
- Parameters:
dns_option (
str
) – the DNS option to add- Returns:
- Return type:
Adds a new DNS option to the setting.
New in version 1.2.
- add_dns_search(dns_search)¶
- Parameters:
dns_search (
str
) – the search domain to add- Returns:
True
if the DNS search domain was added;False
if the search domain was already known- Return type:
Adds a new DNS search domain to the setting.
- add_route(route)¶
- Parameters:
route (
NM.IPRoute
) – the route to add- Returns:
True
if the route was added;False
if the route was already known.- Return type:
Appends a new route and associated information to the setting. The given route is duplicated internally and is not changed by this function. If an identical route (considering attributes as well) already exists, the route is not added and the function returns
False
.Note that before 1.10, this function would not consider route attributes and not add a route that has an existing route with same dest/prefix,next_hop,metric parameters.
- add_routing_rule(routing_rule)¶
- Parameters:
routing_rule (
NM.IPRoutingRule
) – theNM.IPRoutingRule
to add. The address family of the added rule must be compatible with the setting.
Appends a new routing-rule and associated information to the setting. The given routing rules gets sealed and the reference count is incremented. The function does not check whether an identical rule already exists and always appends the rule to the end of the list.
New in version 1.18.
- clear_addresses()¶
Removes all configured addresses.
- clear_dhcp_reject_servers()¶
Removes all configured DHCP reject servers.
New in version 1.28.
- clear_dns()¶
Removes all configured DNS servers.
- clear_dns_options(is_set)¶
- Parameters:
is_set (
bool
) – the dns-options can be either empty or unset (default). Specify how to clear the options.
Removes all configured DNS options.
New in version 1.2.
- clear_dns_searches()¶
Removes all configured DNS search domains.
- clear_routes()¶
Removes all configured routes.
- clear_routing_rules()¶
Removes all configured routing rules.
New in version 1.18.
- get_address(idx)¶
- Parameters:
idx (
int
) – index number of the address to return- Returns:
the address at index idx
- Return type:
- get_auto_route_ext_gw()¶
- Returns:
the
NM.SettingIPConfig
:auto-route-ext-gw
property of the setting- Return type:
New in version 1.42.
- get_dad_timeout()¶
- Returns:
the
NM.SettingIPConfig
:dad-timeout
property.- Return type:
New in version 1.2.
- get_dhcp_dscp()¶
- Returns:
the value for the DSCP field for DHCP
- Return type:
Returns the value contained in the
NM.SettingIPConfig
:dhcp-dscp
property.New in version 1.46.
- get_dhcp_hostname()¶
- Returns:
the configured hostname to send to the DHCP server
- Return type:
Returns the value contained in the
NM.SettingIPConfig
:dhcp-hostname
property.
- get_dhcp_hostname_flags()¶
- Returns:
flags for the DHCP hostname and FQDN
- Return type:
Returns the value contained in the
NM.SettingIPConfig
:dhcp-hostname-flags
property.New in version 1.22.
- get_dhcp_iaid()¶
- Returns:
the configured DHCP IAID (Identity Association Identifier)
- Return type:
Returns the value contained in the
NM.SettingIPConfig
:dhcp-iaid
property.New in version 1.42.
- get_dhcp_reject_servers()¶
- Returns:
A
None
terminated array of DHCP reject servers. Even if no reject servers are configured, this always returns a nonNone
value.- Return type:
[
str
]
New in version 1.28.
- get_dhcp_send_hostname()¶
- Returns:
True
if NetworkManager should send the machine hostname to the DHCP server when requesting addresses to allow the server to automatically update DNS information for this machine.- Return type:
Returns the value contained in the
NM.SettingIPConfig
:dhcp-send-hostname
property.
- get_dhcp_send_release()¶
- Returns:
the
NM.SettingIPConfig
:dhcp-send-release
property of the setting- Return type:
New in version 1.48.
- get_dhcp_timeout()¶
- Returns:
the configured DHCP timeout in seconds. 0 = default for the particular kind of device.
- Return type:
Returns the value contained in the
NM.SettingIPConfig
:dhcp-timeout
property.New in version 1.2.
- get_dns(idx)¶
- get_dns_option(idx)¶
- Parameters:
idx (
int
) – index number of the DNS option- Returns:
the DNS option at index idx
- Return type:
Since 1.46, access at index “len” is allowed and returns
None
.New in version 1.2.
- get_dns_search(idx)¶
- Parameters:
idx (
int
) – index number of the DNS search domain to return- Returns:
the DNS search domain at index idx
- Return type:
Since 1.46, access at index “len” is allowed and returns
None
.
- get_gateway()¶
- get_ignore_auto_dns()¶
- Returns:
True
if automatically configured (ie via DHCP) DNS information should be ignored.- Return type:
Returns the value contained in the
NM.SettingIPConfig
:ignore-auto-dns
property.
- get_ignore_auto_routes()¶
-
Returns the value contained in the
NM.SettingIPConfig
:ignore-auto-routes
property.
- get_may_fail()¶
- Returns:
True
if this connection doesn’t require this type of IP addressing to complete for the connection to succeed.- Return type:
Returns the value contained in the
NM.SettingIPConfig
:may-fail
property.
- get_method()¶
- Returns:
the
NM.SettingIPConfig
:method
property of the setting; seeNM.SettingIP4Config
andNM.SettingIP6Config
for details of the methods available with each type.- Return type:
- get_never_default()¶
-
Returns the value contained in the
NM.SettingIPConfig
:never-default
property.
- get_num_dns_options()¶
- Returns:
the number of configured DNS options
- Return type:
New in version 1.2.
- get_num_routing_rules()¶
- Returns:
the number of configured routing rules
- Return type:
New in version 1.18.
- get_replace_local_rule()¶
- Returns:
the
NM.SettingIPConfig
:replace-local-rule
property of the setting- Return type:
New in version 1.44.
- get_required_timeout()¶
- Returns:
the required timeout for the address family
- Return type:
Returns the value contained in the
NM.SettingIPConfig
:required-timeout
property.New in version 1.34.
- get_route(idx)¶
- Parameters:
idx (
int
) – index number of the route to return- Returns:
the route at index idx
- Return type:
- get_route_metric()¶
- Returns:
the route metric that is used for routes that don’t explicitly specify a metric. See
NM.SettingIPConfig
:route-metric
for more details.- Return type:
Returns the value contained in the
NM.SettingIPConfig
:route-metric
property.
- get_route_table()¶
- Returns:
the configured route-table.
- Return type:
Returns the value contained in the
NM.SettingIPConfig
:route-table
property.New in version 1.10.
- get_routing_rule(idx)¶
- Parameters:
idx (
int
) – index number of the routing_rule to return- Returns:
the routing rule at index idx
- Return type:
New in version 1.18.
- has_dns_options()¶
- Returns:
whether DNS options are initialized or left unset (the default).
- Return type:
NM.SettingIPConfig
can have a list of dns-options. If the list is empty, there are two similar (but differentiated) states. Either the options are explicitly set to have no values, or the options are left undefined. The latter means to use a default configuration, while the former explicitly means “no-options”.New in version 1.2.
- remove_address(idx)¶
- Parameters:
idx (
int
) – index number of the address to remove
Removes the address at index idx.
- remove_address_by_value(address)¶
- Parameters:
address (
NM.IPAddress
) – the IP address to remove- Returns:
True
if the address was found and removed;False
if it was not.- Return type:
Removes the address address.
- remove_dhcp_reject_server(idx)¶
- Parameters:
idx (
int
) – index number of the DHCP reject server
Removes the DHCP reject server at index idx.
New in version 1.28.
- remove_dns(idx)¶
- Parameters:
idx (
int
) – index number of the DNS server to remove
Removes the DNS server at index idx.
- remove_dns_by_value(dns)¶
- Parameters:
dns (
str
) – the DNS server to remove- Returns:
True
if the DNS server was found and removed;False
if it was not.Before 1.42, setting dns to an invalid string was treated as user-error.
- Return type:
Removes the DNS server dns.
- remove_dns_option(idx)¶
- Parameters:
idx (
int
) – index number of the DNS option
Removes the DNS option at index idx.
New in version 1.2.
- remove_dns_option_by_value(dns_option)¶
- Parameters:
dns_option (
str
) – the DNS option to remove- Returns:
True
if the DNS option was found and removed;False
if it was not.- Return type:
Removes the DNS option dns_option.
New in version 1.2.
- remove_dns_search(idx)¶
- Parameters:
idx (
int
) – index number of the DNS search domain
Removes the DNS search domain at index idx.
- remove_dns_search_by_value(dns_search)¶
- Parameters:
dns_search (
str
) – the search domain to remove- Returns:
True
if the DNS search domain was found and removed;False
if it was not.- Return type:
Removes the DNS search domain dns_search.
- remove_route(idx)¶
- Parameters:
idx (
int
) – index number of the route
Removes the route at index idx.
- remove_route_by_value(route)¶
- Parameters:
route (
NM.IPRoute
) – the route to remove- Returns:
True
if the route was found and removed;False
if it was not.- Return type:
Removes the first matching route that matches route. Note that before 1.10, this function would only compare dest/prefix,next_hop,metric and ignore route attributes. Now, route must match exactly.
Property Details¶
- NM.SettingIPConfig.props.addresses¶
- Name:
addresses
- Type:
- Default Value:
- Flags:
Array of IP addresses.
- NM.SettingIPConfig.props.auto_route_ext_gw¶
- Name:
auto-route-ext-gw
- Type:
- Default Value:
- Flags:
VPN connections will default to add the route automatically unless this setting is set to
False
.For other connection types, adding such an automatic route is currently not supported and setting this to
True
has no effect.New in version 1.42.
- NM.SettingIPConfig.props.dad_timeout¶
- Name:
dad-timeout
- Type:
- Default Value:
-1
- Flags:
Maximum timeout in milliseconds used to check for the presence of duplicate IP addresses on the network. If an address conflict is detected, the activation will fail. The property is currently implemented only for IPv4.
A zero value means that no duplicate address detection is performed, -1 means the default value (either the value configured globally in NetworkManger.conf or 200ms). A value greater than zero is a timeout in milliseconds. Note that the time intervals are subject to randomization as per RFC 5227 and so the actual duration can be between half and the full time specified in this property.
New in version 1.2.
- NM.SettingIPConfig.props.dhcp_dscp¶
- Name:
dhcp-dscp
- Type:
- Default Value:
- Flags:
Specifies the value for the DSCP field (traffic class) of the IP header. When empty, the global default value is used; if no global default is specified, it is assumed to be “CS0”. Allowed values are: “CS0”, “CS4” and “CS6”.
The property is currently valid only for IPv4, and it is supported only by the “internal” DHCP plugin.
New in version 1.46.
- NM.SettingIPConfig.props.dhcp_hostname¶
- Name:
dhcp-hostname
- Type:
- Default Value:
- Flags:
If the
NM.SettingIPConfig
:dhcp-send-hostname
property isTrue
, then the specified name will be sent to the DHCP server when acquiring a lease. This property andNM.SettingIP4Config
:dhcp-fqdn
are mutually exclusive and cannot be set at the same time.
- NM.SettingIPConfig.props.dhcp_hostname_flags¶
- Name:
dhcp-hostname-flags
- Type:
- Default Value:
0
- Flags:
Flags for the DHCP hostname and FQDN.
Currently, this property only includes flags to control the FQDN flags set in the DHCP FQDN option. Supported FQDN flags are
NM.DhcpHostnameFlags.FQDN_SERV_UPDATE
,NM.DhcpHostnameFlags.FQDN_ENCODED
andNM.DhcpHostnameFlags.FQDN_NO_UPDATE
. When no FQDN flag is set andNM.DhcpHostnameFlags.FQDN_CLEAR_FLAGS
is set, the DHCP FQDN option will contain no flag. Otherwise, if no FQDN flag is set andNM.DhcpHostnameFlags.FQDN_CLEAR_FLAGS
is not set, the standard FQDN flags are set in the request:NM.DhcpHostnameFlags.FQDN_SERV_UPDATE
,NM.DhcpHostnameFlags.FQDN_ENCODED
for IPv4 andNM.DhcpHostnameFlags.FQDN_SERV_UPDATE
for IPv6.When this property is set to the default value
NM.DhcpHostnameFlags.NONE
, a global default is looked up in NetworkManager configuration. If that value is unset or alsoNM.DhcpHostnameFlags.NONE
, then the standard FQDN flags described above are sent in the DHCP requests.New in version 1.22.
- NM.SettingIPConfig.props.dhcp_iaid¶
- Name:
dhcp-iaid
- Type:
- Default Value:
- Flags:
A string containing the “Identity Association Identifier” (IAID) used by the DHCP client. The string can be a 32-bit number (either decimal, hexadecimal or as colon separated hexadecimal numbers). Alternatively it can be set to the special values “mac”, “perm-mac”, “ifname” or “stable”. When set to “mac” (or “perm-mac”), the last 4 bytes of the current (or permanent) MAC address are used as IAID. When set to “ifname”, the IAID is computed by hashing the interface name. The special value “stable” can be used to generate an IAID based on the stable-id (see connection.stable-id), a per-host key and the interface name. When the property is unset, the value from global configuration is used; if no global default is set then the IAID is assumed to be “ifname”.
For DHCPv4, the IAID is only used with “ipv4.dhcp-client-id” values “duid” and “ipv6-duid” to generate the client-id.
For DHCPv6, note that at the moment this property is only supported by the “internal” DHCPv6 plugin. The “dhclient” DHCPv6 plugin always derives the IAID from the MAC address.
The actually used DHCPv6 IAID for a currently activated interface is exposed in the lease information of the device.
New in version 1.22.
- NM.SettingIPConfig.props.dhcp_reject_servers¶
- Name:
dhcp-reject-servers
- Type:
[
str
]- Default Value:
[]
- Flags:
Array of servers from which DHCP offers must be rejected. This property is useful to avoid getting a lease from misconfigured or rogue servers.
For DHCPv4, each element must be an IPv4 address, optionally followed by a slash and a prefix length (e.g. “192.168.122.0/24”).
This property is currently not implemented for DHCPv6.
New in version 1.28.
- NM.SettingIPConfig.props.dhcp_send_hostname¶
- Name:
dhcp-send-hostname
- Type:
- Default Value:
- Flags:
If
True
, a hostname is sent to the DHCP server when acquiring a lease. Some DHCP servers use this hostname to update DNS databases, essentially providing a static hostname for the computer. If theNM.SettingIPConfig
:dhcp-hostname
property isNone
and this property isTrue
, the current persistent hostname of the computer is sent.
- NM.SettingIPConfig.props.dhcp_send_release¶
- Name:
dhcp-send-release
- Type:
- Default Value:
- Flags:
Whether the DHCP client will send RELEASE message when bringing the connection down. The default value is
NM.Ternary.DEFAULT
. When the default value is specified, then the global value from NetworkManager configuration is looked up, if not set, it is considered asFalse
.New in version 1.48.
- NM.SettingIPConfig.props.dhcp_timeout¶
- Name:
dhcp-timeout
- Type:
- Default Value:
0
- Flags:
A timeout for a DHCP transaction in seconds. If zero (the default), a globally configured default is used. If still unspecified, a device specific timeout is used (usually 45 seconds).
Set to 2147483647 (MAXINT32) for infinity.
- NM.SettingIPConfig.props.dns¶
-
Array of IP addresses of DNS servers.
For DoT (DNS over TLS), the SNI server name can be specified by appending “#example.com” to the IP address of the DNS server. This currently only has effect when using systemd-resolved.
- NM.SettingIPConfig.props.dns_options¶
- Name:
dns-options
- Type:
[
str
]- Default Value:
[]
- Flags:
Array of DNS options to be added to resolv.conf.
None
means that the options are unset and left at the default. In this case NetworkManager will use default options. This is distinct from an empty list of properties.The following options are directly added to resolv.conf: “attempts”, “debug”, “edns0”, “inet6”, “ip6-bytestring”, “ip6-dotint”, “ndots”, “no-aaaa”, “no-check-names”, “no-ip6-dotint”, “no-reload”, “no-tld-query”, “rotate”, “single-request”, “single-request-reopen”, “timeout”, “trust-ad”, “use-vc”. See the resolv.conf(5) man page for a detailed description of these options.
In addition, NetworkManager supports the special options “_no-add-edns0” and “_no-add-trust-ad”. They are not added to resolv.conf, and can be used to prevent the automatic addition of options “edns0” and “trust-ad” when using caching DNS plugins (see below).
The “trust-ad” setting is only honored if the profile contributes name servers to resolv.conf, and if all contributing profiles have “trust-ad” enabled.
When using a caching DNS plugin (dnsmasq or systemd-resolved in NetworkManager.conf) then “edns0” and “trust-ad” are automatically added, unless “_no-add-edns0” and “_no-add-trust-ad” are present.
New in version 1.2.
- NM.SettingIPConfig.props.dns_priority¶
- Name:
dns-priority
- Type:
- Default Value:
0
- Flags:
DNS servers priority.
The relative priority for DNS servers specified by this setting. A lower numerical value is better (higher priority).
Negative values have the special effect of excluding other configurations with a greater numerical priority value; so in presence of at least one negative priority, only DNS servers from connections with the lowest priority value will be used. To avoid all DNS leaks, set the priority of the profile that should be used to the most negative value of all active connections profiles.
Zero selects a globally configured default value. If the latter is missing or zero too, it defaults to 50 for VPNs (including WireGuard) and 100 for other connections.
Note that the priority is to order DNS settings for multiple active connections. It does not disambiguate multiple DNS servers within the same connection profile.
When multiple devices have configurations with the same priority, VPNs will be considered first, then devices with the best (lowest metric) default route and then all other devices.
When using dns=default, servers with higher priority will be on top of resolv.conf. To prioritize a given server over another one within the same connection, just specify them in the desired order. Note that commonly the resolver tries name servers in /etc/resolv.conf in the order listed, proceeding with the next server in the list on failure. See for example the “rotate” option of the dns-options setting. If there are any negative DNS priorities, then only name servers from the devices with that lowest priority will be considered.
When using a DNS resolver that supports Conditional Forwarding or Split DNS (with dns=dnsmasq or dns=systemd-resolved settings), each connection is used to query domains in its search list. The search domains determine which name servers to ask, and the DNS priority is used to prioritize name servers based on the domain. Queries for domains not present in any search list are routed through connections having the ‘~.’ special wildcard domain, which is added automatically to connections with the default route (or can be added manually). When multiple connections specify the same domain, the one with the best priority (lowest numerical value) wins. If a sub domain is configured on another interface it will be accepted regardless the priority, unless parent domain on the other interface has a negative priority, which causes the sub domain to be shadowed. With Split DNS one can avoid undesired DNS leaks by properly configuring DNS priorities and the search domains, so that only name servers of the desired interface are configured.
New in version 1.4.
- NM.SettingIPConfig.props.dns_search¶
- Name:
dns-search
- Type:
[
str
]- Default Value:
[]
- Flags:
List of DNS search domains. Domains starting with a tilde (‘~’) are considered ‘routing’ domains and are used only to decide the interface over which a query must be forwarded; they are not used to complete unqualified host names.
When using a DNS plugin that supports Conditional Forwarding or Split DNS, then the search domains specify which name servers to query. This makes the behavior different from running with plain /etc/resolv.conf. For more information see also the dns-priority setting.
When set on a profile that also enabled DHCP, the DNS search list received automatically (option 119 for DHCPv4 and option 24 for DHCPv6) gets merged with the manual list. This can be prevented by setting “ignore-auto-dns”. Note that if no DNS searches are configured, the fallback will be derived from the domain from DHCP (option 15).
- NM.SettingIPConfig.props.gateway¶
- Name:
gateway
- Type:
- Default Value:
- Flags:
The gateway associated with this configuration. This is only meaningful if
NM.SettingIPConfig
:addresses
is also set.Setting the gateway causes NetworkManager to configure a standard default route with the gateway as next hop. This is ignored if
NM.SettingIPConfig
:never-default
is set. An alternative is to configure the default route explicitly with a manual route and /0 as prefix length.Note that the gateway usually conflicts with routing that NetworkManager configures for WireGuard interfaces, so usually it should not be set in that case. See
NM.SettingWireGuard
:ip4-auto-default-route
.
- NM.SettingIPConfig.props.ignore_auto_dns¶
- Name:
ignore-auto-dns
- Type:
- Default Value:
- Flags:
When
NM.SettingIPConfig
:method
is set to “auto” and this property toTrue
, automatically configured name servers and search domains are ignored and only name servers and search domains specified in theNM.SettingIPConfig
:dns
andNM.SettingIPConfig
:dns-search
properties, if any, are used.
- NM.SettingIPConfig.props.ignore_auto_routes¶
- Name:
ignore-auto-routes
- Type:
- Default Value:
- Flags:
When
NM.SettingIPConfig
:method
is set to “auto” and this property toTrue
, automatically configured routes are ignored and only routes specified in theNM.SettingIPConfig
:routes
property, if any, are used.
- NM.SettingIPConfig.props.may_fail¶
- Name:
may-fail
- Type:
- Default Value:
- Flags:
If
True
, allow overall network configuration to proceed even if the configuration specified by this property times out. Note that at least one IP configuration must succeed or overall network configuration will still fail. For example, in IPv6-only networks, setting this property toTrue
on theNM.SettingIP4Config
allows the overall network configuration to succeed if IPv4 configuration fails but IPv6 configuration completes successfully.
- NM.SettingIPConfig.props.method¶
- Name:
method
- Type:
- Default Value:
- Flags:
IP configuration method.
NM.SettingIP4Config
andNM.SettingIP6Config
both support “disabled”, “auto”, “manual”, and “link-local”. See the subclass-specific documentation for other values.In general, for the “auto” method, properties such as
NM.SettingIPConfig
:dns
andNM.SettingIPConfig
:routes
specify information that is added on to the information returned from automatic configuration. TheNM.SettingIPConfig
:ignore-auto-routes
andNM.SettingIPConfig
:ignore-auto-dns
properties modify this behavior.For methods that imply no upstream network, such as “shared” or “link-local”, these properties must be empty.
For IPv4 method “shared”, the IP subnet can be configured by adding one manual IPv4 address or otherwise 10.42.x.0/24 is chosen. Note that the shared method must be configured on the interface which shares the internet to a subnet, not on the uplink which is shared.
- NM.SettingIPConfig.props.never_default¶
- Name:
never-default
- Type:
- Default Value:
- Flags:
If
True
, this connection will never be the default connection for this IP type, meaning it will never be assigned the default route by NetworkManager.
- NM.SettingIPConfig.props.replace_local_rule¶
- Name:
replace-local-rule
- Type:
- Default Value:
- Flags:
Connections will default to keep the autogenerated priority 0 local rule unless this setting is set to
True
.New in version 1.44.
- NM.SettingIPConfig.props.required_timeout¶
- Name:
required-timeout
- Type:
- Default Value:
-1
- Flags:
The minimum time interval in milliseconds for which dynamic IP configuration should be tried before the connection succeeds.
This property is useful for example if both IPv4 and IPv6 are enabled and are allowed to fail. Normally the connection succeeds as soon as one of the two address families completes; by setting a required timeout for e.g. IPv4, one can ensure that even if IP6 succeeds earlier than IPv4, NetworkManager waits some time for IPv4 before the connection becomes active.
Note that if
NM.SettingIPConfig
:may-fail
isFalse
for the same address family, this property has no effect as NetworkManager needs to wait for the full DHCP timeout.A zero value means that no required timeout is present, -1 means the default value (either configuration ipvx.required-timeout override or zero).
New in version 1.34.
- NM.SettingIPConfig.props.route_metric¶
- Name:
route-metric
- Type:
- Default Value:
-1
- Flags:
The default metric for routes that don’t explicitly specify a metric. The default value -1 means that the metric is chosen automatically based on the device type. The metric applies to dynamic routes, manual (static) routes that don’t have an explicit metric setting, address prefix routes, and the default route. Note that for IPv6, the kernel accepts zero (0) but coerces it to 1024 (user default). Hence, setting this property to zero effectively mean setting it to 1024. For IPv4, zero is a regular value for the metric.
- NM.SettingIPConfig.props.route_table¶
- Name:
route-table
- Type:
- Default Value:
0
- Flags:
Enable policy routing (source routing) and set the routing table used when adding routes.
This affects all routes, including device-routes, IPv4LL, DHCP, SLAAC, default-routes and static routes. But note that static routes can individually overwrite the setting by explicitly specifying a non-zero routing table.
If the table setting is left at zero, it is eligible to be overwritten via global configuration. If the property is zero even after applying the global configuration value, policy routing is disabled for the address family of this connection.
Policy routing disabled means that NetworkManager will add all routes to the main table (except static routes that explicitly configure a different table). Additionally, NetworkManager will not delete any extraneous routes from tables except the main table. This is to preserve backward compatibility for users who manage routing tables outside of NetworkManager.
New in version 1.10.
- NM.SettingIPConfig.props.routes¶
- Name:
routes
- Type:
- Default Value:
- Flags:
Array of IP routes.