1Route classifier in tc(8) Linux Route classifier in tc(8)
2
3
4
6 route - route traffic control filter
7
9 tc filter ... route [ from REALM | fromif TAG ] [ to REALM ] [ classid
10 CLASSID ] [ action ACTION_SPEC ]
11
13 Match packets based on routing table entries. This filter centers
14 around the possibility to assign a realm to routing table entries. For
15 any packet to be classified by this filter, a routing table lookup is
16 performed and the returned realm is used to decide on whether the
17 packet is a match or not.
18
20 action ACTION_SPEC
21 Apply an action from the generic actions framework on matching
22 packets.
23
24 classid CLASSID
25 Push matching packets into the class identified by CLASSID.
26
27 from REALM
28 fromif TAG
29 Perform source route lookups. TAG is the name of an interface
30 which must be present on the system at the time of tc invoca‐
31 tion.
32
33 to REALM
34 Match if normal (i.e., destination) routing returns the given
35 REALM.
36
38 Consider the subnet 192.168.2.0/24 being attached to eth0:
39
40 ip route add 192.168.2.0/24 dev eth0 realm 2
41
42 The following route filter will then match packets from that subnet:
43
44 tc filter add ... route from 2 classid 1:2
45
46 and pass packets on to class 1:2.
47
49 Due to implementation details, realm values must be in a range from 0
50 to 255, inclusive. Alternatively, a verbose name defined in
51 /etc/iproute2/rt_realms may be given instead.
52
54 tc(8), ip-route(8)
55
56
57
58iproute2 21 Oct 2015 Route classifier in tc(8)