Route classifier in tc(8) Linux Route classifier in tc(8)

# [NAME](#NAME)

route - route traffic control filter

# [SYNOPSIS](#SYNOPSIS)

**tc** **filter** ... **route** \[ **from** *REALM* | **fromif** *TAG* ] \[ **to** *REALM* ] \[ **classid** *CLASSID* ] \[ **action** *ACTION\_SPEC* ]

# [DESCRIPTION](#DESCRIPTION)

Match packets based on routing table entries. This filter centers around the possibility to assign a **realm** to routing table entries. For any packet to be classified by this filter, a routing table lookup is performed and the returned **realm** is used to decide on whether the packet is a match or not.

# [OPTIONS](#OPTIONS)

[**action ACTION\_SPEC**](#action)

Apply an action from the generic actions framework on matching packets.

[**classid CLASSID**](#classid)

Push matching packets into the class identified by *CLASSID*.

[**from REALM**](#from)

[**fromif TAG**](#fromif)

Perform source route lookups. *TAG* is the name of an interface which must be present on the system at the time of **tc** invocation.

[**to REALM**](#to)

Match if normal (i.e., destination) routing returns the given *REALM*.

# [EXAMPLES](#EXAMPLES)

Consider the subnet 192.168.2.0/24 being attached to eth0:

```
ip route add 192.168.2.0/24 dev eth0 realm 2
```

The following **route** filter will then match packets from that subnet:

```
tc filter add ... route from 2 classid 1:2
```

and pass packets on to class 1:2.

# [NOTES](#NOTES)

Due to implementation details, **realm** values must be in a range from 0 to 255, inclusive. Alternatively, a verbose name defined in /etc/iproute2/rt\_realms may be given instead.

# [SEE ALSO](#SEE_ALSO)

[**tc**(8)](/man/os/iproute2/tc.8), [**ip-route**(8)](/man/os/iproute2/ip-route.8)

21 Oct 2015 iproute2

---

Document: tc-route(8) from iproute2 7.3.0-r0 (Chainguard OS)
Source: https://kernel.googlesource.com/pub/scm/network/iproute2/iproute2
