from small one page howto to huge articles all in one place

search text in:




Other .linuxhowtos.org sites:gentoo.linuxhowtos.org



Last additions:
using iotop to find disk usage hogs

using iotop to find disk usage hogs

words:

887

views:

209612

userrating:


May 25th. 2007:
Words

486

Views

258612

why adblockers are bad


Workaround and fixes for the current Core Dump Handling vulnerability affected kernels

Workaround and fixes for the current Core Dump Handling vulnerability affected kernels

words:

161

views:

149912

userrating:


April, 26th. 2006:

Druckversion
You are here: manpages





Generic actions in tc

Section: Linux (8)
Updated: 11 Jan 2023
Index Return to Main Contents

 

NAME

gact- generic action  

SYNOPSIS


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

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

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 t-actions(8).

 

EXAMPLES

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

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


 

Index

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
EXAMPLES
SEE ALSO





Support us on Content Nation
rdf newsfeed | rss newsfeed | Atom newsfeed
- Powered by LeopardCMS - Running on Gentoo -
Copyright 2004-2025 Sascha Nitsch Unternehmensberatung GmbH
Valid XHTML1.1 : Valid CSS
- Level Triple-A Conformance to Web Content Accessibility Guidelines 1.0 -
- Copyright and legal notices -
Time to create this page: 13.9 ms