website/content/v1.13/reference/configuration/network/routingruleconfig.md
{{< highlight yaml >}} 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.
{{< /highlight >}}
| Field | Type | Description | Value(s) |
|---|---|---|---|
name | string | Priority of the routing rule. | |
| Lower values are matched first. | |||
| Must be between 1 and 32765 (excluding reserved priorities [0 32500 32501 32766 32767]). | |||
| Must be unique across all routing rules in the configuration. <details><summary>Show example(s)</summary>{{< highlight yaml >}} | |||
| name: 1000 | |||
| {{< /highlight >}}</details> | |||
src | Prefix | Source address prefix to match. | |
| If empty, matches all sources. <details><summary>Show example(s)</summary>{{< highlight yaml >}} | |||
| src: 10.0.0.0/8 | |||
| {{< /highlight >}}</details> | |||
dst | Prefix | Destination address prefix to match. | |
| If empty, matches all destinations. <details><summary>Show example(s)</summary>{{< highlight yaml >}} | |||
| dst: 192.168.0.0/16 | |||
| {{< /highlight >}}</details> | |||
table | RoutingTable | The routing table to look up if the rule matches. <details><summary>Show example(s)</summary>{{< highlight yaml >}} | |
| table: 100 | |||
| {{< /highlight >}}</details> | |||
action | RoutingRuleAction | The action to perform when the rule matches. | |
| Defaults to "unicast" (table lookup). | unicast | ||
blackhole | |||
unreachable | |||
prohibit | |||
iifName | string | Match packets arriving on this interface. <details><summary>Show example(s)</summary>{{< highlight yaml >}} | |
| iifName: eth0 | |||
| {{< /highlight >}}</details> | |||
oifName | string | Match packets going out on this interface. <details><summary>Show example(s)</summary>{{< highlight yaml >}} | |
| oifName: eth1 | |||
| {{< /highlight >}}</details> | |||
fwMark | uint32 | Match packets with this firewall mark value. <details><summary>Show example(s)</summary>{{< highlight yaml >}} | |
| fwMark: 256 | |||
| {{< /highlight >}}</details> | |||
fwMask | uint32 | Mask for the firewall mark comparison. <details><summary>Show example(s)</summary>{{< highlight yaml >}} | |
| fwMask: 65280 | |||
| {{< /highlight >}}</details> |