Created
February 5, 2025 13:17
-
-
Save Ramblurr/b26b2d649ef44e827ed6a624ffffbb3b to your computer and use it in GitHub Desktop.
systemd networkd [RoutingPolicyRule] Section Options
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[RoutingPolicyRule] Section Options | |
An [RoutingPolicyRule] section accepts the following settings. Specify several [RoutingPolicyRule] sections to configure several rules. | |
TypeOfService= | |
This specifies the Type of Service (ToS) field of packets to match; it takes an unsigned integer in the range 0…255. The field can be used to specify precedence (the first 3 bits) and ToS (the next 3 bits). The field can be also used to specify Differentiated Services Code Point (DSCP) (the first 6 bits) and Explicit Congestion Notification (ECN) (the last 2 bits). See Type of Service and Differentiated services for more details. | |
Added in version 235. | |
From= | |
Specifies the source address prefix to match. Possibly followed by a slash and the prefix length. | |
Added in version 235. | |
To= | |
Specifies the destination address prefix to match. Possibly followed by a slash and the prefix length. | |
Added in version 235. | |
FirewallMark= | |
Specifies the iptables firewall mark value to match (a number in the range 1…4294967295). Optionally, the firewall mask (also a number between 1…4294967295) can be suffixed with a slash ("/"), e.g., "7/255". | |
Added in version 235. | |
Table= | |
Specifies the routing table identifier to look up if the rule selector matches. Takes one of predefined names "default", "main", and "local", and names defined in RouteTable= in networkd.conf(5), or a number between 1 and 4294967295. Defaults to "main". Ignored if L3MasterDevice= is true. | |
Added in version 235. | |
Priority= | |
Specifies the priority of this rule. Priority= is an integer in the range 0…4294967295. Higher number means lower priority, and rules get processed in order of increasing number. Defaults to unset, and the kernel will pick a value dynamically. | |
Added in version 235. | |
GoTo= | |
Specifies the target priority used by "goto" type of rule. Takes an integer in the range 1…4294967295. This must be larger than the priority of this rule specified in Priority=. When specified, Type=goto is implied. This is mandatory when Type=goto. | |
Added in version 257. | |
IncomingInterface= | |
Specifies incoming device to match. If the interface is loopback, the rule only matches packets originating from this host. | |
Added in version 236. | |
OutgoingInterface= | |
Specifies the outgoing device to match. The outgoing interface is only available for packets originating from local sockets that are bound to a device. | |
Added in version 236. | |
L3MasterDevice= | |
Takes a boolean. Specifies whether the rule is to direct lookups to the tables associated with level 3 master devices (also known as Virtual Routing and Forwarding or VRF devices). For further details see Virtual Routing and Forwarding (VRF). Defaults to false. | |
Added in version 256. | |
SourcePort= | |
Specifies the source IP port or IP port range match in forwarding information base (FIB) rules. A port range is specified by the lower and upper port separated by a dash. Defaults to unset. | |
Added in version 240. | |
DestinationPort= | |
Specifies the destination IP port or IP port range match in forwarding information base (FIB) rules. A port range is specified by the lower and upper port separated by a dash. Defaults to unset. | |
Added in version 240. | |
IPProtocol= | |
Specifies the IP protocol to match in forwarding information base (FIB) rules. Takes IP protocol name such as "tcp", "udp" or "sctp", or IP protocol number such as "6" for "tcp" or "17" for "udp". Defaults to unset. | |
Added in version 240. | |
InvertRule= | |
A boolean. Specifies whether the rule is to be inverted. Defaults to false. | |
Added in version 240. | |
Family= | |
Takes a special value "ipv4", "ipv6", or "both". By default, the address family is determined by the address specified in To= or From=. If neither To= nor From= are specified, then defaults to "ipv4". | |
Added in version 243. | |
User= | |
Takes a username, a user ID, or a range of user IDs separated by a dash. Defaults to unset. | |
Added in version 245. | |
SuppressPrefixLength= | |
Takes a number N in the range 0…128 and rejects routing decisions that have a prefix length of N or less. Defaults to unset. | |
Added in version 245. | |
SuppressInterfaceGroup= | |
Takes an integer in the range 0…2147483647 and rejects routing decisions that have an interface with the same group id. It has the same meaning as suppress_ifgroup in ip rule. Defaults to unset. | |
Added in version 250. | |
Type= | |
Specifies Routing Policy Database (RPDB) rule type. Takes one of "table", "goto", "nop", "blackhole", "unreachable", or "prohibit". When "goto", the target priority must be specified in GoTo=. Defaults to "table". | |
Added in version 248. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment