tc-flower (8)
NAME
flower - flow based traffic control filterSYNOPSIS
tc filter ... flower [ MATCH_LIST ] [ action ACTION_SPEC ] [ classid CLASSID ]
MATCH_LIST := [ MATCH_LIST ] MATCH
MATCH := { indev ifname | { dst_mac | src_mac } mac_address | eth_type { ipv4 | ipv6 | ETH_TYPE } | ip_proto { tcp | udp | IP_PROTO } | { dst_ip | src_ip } { ipv4_address | ipv6_address } | { dst_port | src_port } port_number }
DESCRIPTION
The flower filter matches flows to the set of keys specified and assigns an arbitrarily chosen class ID to packets belonging to them. Additionally (or alternatively) an action from the generic action framework may be called.OPTIONS
- action ACTION_SPEC
- Apply an action from the generic actions framework on matching packets.
- classid CLASSID
- Specify a class to pass matching packets on to. CLASSID is in the form X:Y, while X and Y are interpreted as numbers in hexadecimal format.
- indev ifname
- Match on incoming interface name. Obviously this makes sense only for forwarded flows. ifname is the name of an interface which must exist at the time of tc invocation.
- dst_mac mac_address
- src_mac mac_address Match on source or destination MAC address.
- eth_type ETH_TYPE
- Match on layer three protocol. ETH_TYPE may be either ipv4,ipv6 or an unsigned 16bit value in hexadecimal format.
- ip_proto IP_PROTO
- Match on layer four protocol. IP_PROTO may be either tcp,udp or an unsigned 8bit value in hexadecimal format.
- dst_ip ADDRESS
- src_ip ADDRESS Match on source or destination IP address. ADDRESS must be a valid IPv4 or IPv6 address, depending on ether_type, which has to be specified in beforehand.
- dst_port NUMBER
- src_port NUMBER Match on layer 4 protocol source or destination port number. Only available for ip_proto values udp and tcp, which has to be specified in beforehand.