> ## Documentation Index
> Fetch the complete documentation index at: https://docs.siderolabs.com/llms.txt
> Use this file to discover all available pages before exploring further.

> RoutingRuleConfig is a config document to configure Linux policy routing rules.

# RoutingRuleConfig

```yaml theme={null}
apiVersion: v1alpha1
kind: RoutingRuleConfig
name: "1000" # Priority of the routing rule.
src: 10.0.0.0/8 # Source address prefix to match.
table: "100" # The routing table to look up if the rule matches.
action: unicast # The action to perform when the rule matches.

# # Destination address prefix to match.
# dst: 192.168.0.0/16

# # Match packets arriving on this interface.
# iifName: eth0

# # Match packets going out on this interface.
# oifName: eth1

# # Match packets with this firewall mark value.
# fwMark: 256

# # Mask for the firewall mark comparison.
# fwMask: 65280
```

<table>
  <thead>
    <tr>
      <th>Field</th>
      <th>Type</th>
      <th>Description</th>
      <th>Value(s)</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>`name`</td>
      <td>string</td>
      <td>Priority of the routing rule.<br />Lower values are matched first.<br />Must be between 1 and 32765 (excluding reserved priorities \[0 32500 32501 32766 32767]).<br />Must be unique across all routing rules in the configuration.</td>

      <td />
    </tr>

    <tr>
      <td>`src`</td>
      <td>Prefix</td>
      <td>Source address prefix to match.<br />If empty, matches all sources.</td>

      <td />
    </tr>

    <tr>
      <td>`dst`</td>
      <td>Prefix</td>
      <td>Destination address prefix to match.<br />If empty, matches all destinations.</td>

      <td />
    </tr>

    <tr>
      <td>`table`</td>
      <td>RoutingTable</td>
      <td>The routing table to look up if the rule matches.</td>

      <td />
    </tr>

    <tr>
      <td>`action`</td>
      <td>RoutingRuleAction</td>
      <td>The action to perform when the rule matches.<br />Defaults to "unicast" (table lookup).</td>
      <td>`unicast`<br />`blackhole`<br />`unreachable`<br />`prohibit`<br /></td>
    </tr>

    <tr>
      <td>`iifName`</td>
      <td>string</td>
      <td>Match packets arriving on this interface.</td>

      <td />
    </tr>

    <tr>
      <td>`oifName`</td>
      <td>string</td>
      <td>Match packets going out on this interface.</td>

      <td />
    </tr>

    <tr>
      <td>`fwMark`</td>
      <td>uint32</td>
      <td>Match packets with this firewall mark value.</td>

      <td />
    </tr>

    <tr>
      <td>`fwMask`</td>
      <td>uint32</td>
      <td>Mask for the firewall mark comparison.</td>

      <td />
    </tr>
  </tbody>
</table>
