{"id":2779,"date":"2022-12-20T15:17:17","date_gmt":"2022-12-20T18:17:17","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/route-classifier-in-tc-man8\/"},"modified":"2022-12-20T15:17:17","modified_gmt":"2022-12-20T18:17:17","slug":"route-classifier-in-tc-man8","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/route-classifier-in-tc-man8\/","title":{"rendered":"Route classifier in tc (man8)"},"content":{"rendered":"<h1 align=\"center\">Route classifier in tc<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#OPTIONS\">OPTIONS<\/a><br \/> <a href=\"#EXAMPLES\">EXAMPLES<\/a><br \/> <a href=\"#NOTES\">NOTES<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">route \u2212 route traffic control filter<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:23%; margin-top: 1em\"><b>tc filter<\/b> &#8230; <b>route<\/b> [ <b>from<\/b> <i>REALM<\/i> | <b>fromif<\/b> <i>TAG<\/i> ] [ <b>to<\/b> <i>REALM<\/i> ] [ <b>classid<\/b> <i>CLASSID<\/i> ] [ <b>action<\/b> <i>ACTION_SPEC<\/i> ]<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Match packets based on routing table entries. This filter centers around the possibility to assign a <b>realm<\/b> to routing table entries. For any packet to be classified by this filter, a routing table lookup is performed and the returned <b>realm<\/b> is used to decide on whether the packet is a match or not.<\/p>\n<h2>OPTIONS <a name=\"OPTIONS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>action<\/b> <i>ACTION_SPEC<\/i><\/p>\n<p style=\"margin-left:22%;\">Apply an action from the generic actions framework on matching packets.<\/p>\n<p style=\"margin-left:11%;\"><b>classid<\/b> <i>CLASSID<\/i><\/p>\n<p style=\"margin-left:22%;\">Push matching packets into the class identified by <i>CLASSID<\/i>.<\/p>\n<p style=\"margin-left:11%;\"><b>from<\/b> <i>REALM<\/i> <b><br \/> fromif<\/b> <i>TAG<\/i><\/p>\n<p style=\"margin-left:22%;\">Perform source route lookups. <i>TAG<\/i> is the name of an interface which must be present on the system at the time of <b>tc<\/b> invocation.<\/p>\n<p style=\"margin-left:11%;\"><b>to<\/b> <i>REALM<\/i><\/p>\n<p style=\"margin-left:22%;\">Match if normal (i.e., destination) routing returns the given <i>REALM<\/i>.<\/p>\n<h2>EXAMPLES <a name=\"EXAMPLES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Consider the subnet 192.168.2.0\/24 being attached to eth0:<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">ip route add 192.168.2.0\/24 dev eth0 realm 2<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The following <b>route<\/b> filter will then match packets from that subnet:<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">tc filter add &#8230; route from 2 classid 1:2<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">and pass packets on to class 1:2.<\/p>\n<h2>NOTES <a name=\"NOTES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Due to implementation details, <b>realm<\/b> 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.<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>tc<\/b>(8), <b>ip-route<\/b>(8)<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  route \u2212 route traffic control filter <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[5,52,4,133],"class_list":["post-2779","post","type-post","status-publish","format-standard","hentry","category-8-administracion-del-sistema","tag-5","tag-administracion","tag-man8","tag-tc-route"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/2779","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=2779"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/2779\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=2779"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=2779"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=2779"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}