{"id":3080,"date":"2022-12-20T16:43:26","date_gmt":"2022-12-20T19:43:26","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/match-all-classifier-in-tc-man8\/"},"modified":"2022-12-20T16:43:26","modified_gmt":"2022-12-20T19:43:26","slug":"match-all-classifier-in-tc-man8","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/match-all-classifier-in-tc-man8\/","title":{"rendered":"Match-all classifier in tc (man8)"},"content":{"rendered":"<h1 align=\"center\">Match-all 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=\"#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\">matchall \u2212 traffic control filter that matches every packet<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:23%; margin-top: 1em\"><b>tc filter<\/b> &#8230; <b>matchall<\/b> [ <b>skip_sw<\/b> | <b>skip_hw<\/b> ] [ <b>action<\/b> <i>ACTION_SPEC<\/i> ] [ <b>classid<\/b> <i>CLASSID<\/i> ]<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The <b>matchall<\/b> filter allows to classify every packet that flows on the port and run a action on it.<\/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>skip_sw<\/b><\/p>\n<p style=\"margin-left:22%;\">Do not process filter by software. If hardware has no offload support for this filter, or TC offload is not enabled for the interface, operation will fail.<\/p>\n<p style=\"margin-left:11%;\"><b>skip_hw<\/b><\/p>\n<p style=\"margin-left:22%;\">Do not process filter by hardware.<\/p>\n<h2>EXAMPLES <a name=\"EXAMPLES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">To create ingress mirroring from port eth1 to port eth2:<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">tc qdisc add dev eth1 handle ffff: ingress <br \/> tc filter add dev eth1 parent ffff:  <br \/> matchall skip_sw  <br \/> action mirred egress mirror  <br \/> dev eth2<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The first command creates an ingress qdisc with handle <b>ffff:<\/b> on device <b>eth1<\/b> where the second command attaches a matchall filters on it that mirrors the packets to device eth2.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">To create egress mirroring from port eth1 to port eth2:<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">tc qdisc add dev eth1 handle 1: root prio <br \/> tc filter add dev eth1 parent 1:  <br \/> matchall skip_sw  <br \/> action mirred egress mirror  <br \/> dev eth2<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The first command creates an egress qdisc with handle <b>1:<\/b> that replaces the root qdisc on device <b>eth1<\/b> where the second command attaches a matchall filters on it that mirrors the packets to device eth2.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">To sample one of every 100 packets flowing into interface eth0 to psample group 12:<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">tc qdisc add dev eth0 handle ffff: ingress <br \/> tc filter add dev eth0 parent ffff: matchall  <br \/> action sample rate 100 group 12<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>tc<\/b>(8),<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  matchall \u2212 traffic control filter that matches every packet <\/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,229],"class_list":["post-3080","post","type-post","status-publish","format-standard","hentry","category-8-administracion-del-sistema","tag-5","tag-administracion","tag-man8","tag-tc-matchall"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3080","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=3080"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3080\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=3080"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=3080"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=3080"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}