tc-gact(8) — Linux manual page

NAME | SYNOPSIS | DESCRIPTION | OPTIONS | EXAMPLES | SEE ALSO | COLOPHON

Generic actions in tc(8)          Linux         Generic actions in tc(8)

NAME         top

       gact - generic action

SYNOPSIS         top

       tc ... action gact CONTROL [ RAND ] [ INDEX ]
       CONTROL := { reclassify | drop | continue | pass | pipe |
               goto chain CHAIN_INDEX |
               jump JUMP_COUNT }

       RAND := random RANDTYPE CONTROL VAL
       RANDTYPE := { netrand | determ }
       VAL := number not exceeding 10000
       JUMP_COUNT := absolute jump from start of action list
       INDEX := index value used

DESCRIPTION         top

       The gact action allows reclassify, dropping, passing, or
       accepting packets.  At the moment there are only two algorithms.
       One is deterministic and the other uses internal kernel netrand.

OPTIONS         top

       random RANDTYPE CONTROL VAL
              The probability of taking the action expressed in terms of
              1 out of VAL packets.

       CONTROL
              Indicate how tc should proceed if the packet matches.  For
              a description of the possible CONTROL values, see
              tc-actions(8).

EXAMPLES         top

       Apply a rule on ingress to drop packets from a given source
       address.
              # tc filter add dev eth0 parent ffff: protocol ip prio 6 u32 match ip src 10.0.0.9/32 flowid 1:16 action drop

       Allow 1 out 10 packets from source randomly using the netrand
       generator
              # tc filter add dev eth0 parent ffff: protocol ip prio 6 u32 match ip src 10.0.0.9/32 flowid 1:16 action drop random netrand ok 10

       Deterministically accept every second packet
              # tc filter add dev eth0 parent ffff: protocol ip prio 6 u32 match ip src 10.0.0.9/32 flowid 1:16 action drop random determ ok 2

SEE ALSO         top

       tc(8), tc-actions(8), tc-u32(8)

COLOPHON         top

       This page is part of the iproute2 (utilities for controlling
       TCP/IP networking and traffic) project.  Information about the
       project can be found at 
       ⟨http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2⟩.
       If you have a bug report for this manual page, send it to
       [email protected], [email protected].  This page was
       obtained from the project's upstream Git repository
       ⟨https://git.kernel.org/pub/scm/network/iproute2/iproute2.git⟩ on
       2024-06-14.  (At that time, the date of the most recent commit
       that was found in the repository was 2024-06-11.)  If you
       discover any rendering problems in this HTML version of the page,
       or you believe there is a better or more up-to-date source for
       the page, or you have corrections or improvements to the
       information in this COLOPHON (which is not part of the original
       manual page), send a mail to [email protected]

iproute2                       11 Jan 2023      Generic actions in tc(8)

Pages that refer to this page: tc(8)