Go to file
Amritha Nambiar e20e50b0c1 tc: flower: Classify packets based port ranges
Added support for filtering based on port ranges.
UAPI changes have been accepted into net-next.

Example:
1. Match on a port range:
-------------------------
$ tc filter add dev enp4s0 protocol ip parent ffff:\
  prio 1 flower ip_proto tcp dst_port range 20-30 skip_hw\
  action drop

$ tc -s filter show dev enp4s0 parent ffff:
filter protocol ip pref 1 flower chain 0
filter protocol ip pref 1 flower chain 0 handle 0x1
  eth_type ipv4
  ip_proto tcp
  dst_port range 20-30
  skip_hw
  not_in_hw
        action order 1: gact action drop
         random type none pass val 0
         index 1 ref 1 bind 1 installed 85 sec used 3 sec
        Action statistics:
        Sent 460 bytes 10 pkt (dropped 10, overlimits 0 requeues 0)
        backlog 0b 0p requeues 0

2. Match on IP address and port range:
--------------------------------------
$ tc filter add dev enp4s0 protocol ip parent ffff:\
  prio 1 flower dst_ip 192.168.1.1 ip_proto tcp dst_port range 100-200\
  skip_hw action drop

$ tc -s filter show dev enp4s0 parent ffff:
filter protocol ip pref 1 flower chain 0 handle 0x2
  eth_type ipv4
  ip_proto tcp
  dst_ip 192.168.1.1
  dst_port range 100-200
  skip_hw
  not_in_hw
        action order 1: gact action drop
         random type none pass val 0
         index 2 ref 1 bind 1 installed 58 sec used 2 sec
        Action statistics:
        Sent 920 bytes 20 pkt (dropped 20, overlimits 0 requeues 0)
        backlog 0b 0p requeues 0

v3:
Modified flower_port_range_attr_type calls.

v2:
Addressed Jiri's comment to sync output format with input

Signed-off-by: Amritha Nambiar <amritha.nambiar@intel.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
2018-11-20 14:34:56 -08:00
bash-completion tc: bash-completion: add missing 'classid' keyword 2017-12-12 12:11:37 -08:00
bridge bridge: fdb: remove redundant dev string in show output 2018-11-09 07:50:01 -08:00
devlink devlink: Fix error reporting in cmd_resource_set() 2018-10-22 10:05:18 -07:00
doc/actions doc/man: spelling fixes 2018-10-18 13:15:45 -07:00
etc/iproute2 iproute2: Add support for a few routing protocols 2018-06-11 11:18:30 -07:00
examples examples: fix spelling errors 2018-10-18 13:18:56 -07:00
genl Include bsd/string.h only in include/utils.h 2018-11-05 08:38:32 -08:00
include Update kernel headers 2018-11-20 14:33:09 -08:00
ip iplink_geneve: Add DF configuration 2018-11-09 08:51:47 -08:00
lib Include bsd/string.h only in include/utils.h 2018-11-05 08:38:32 -08:00
man iplink_geneve: Add DF configuration 2018-11-09 08:51:47 -08:00
misc Pass CPPFLAGS to the compiler 2018-11-09 08:07:18 -08:00
netem SPDX license identifiers 2017-11-24 12:21:35 -08:00
rdma Merge branch 'iproute2-master' into iproute2-next 2018-11-09 08:50:50 -08:00
schema bridge: add json schema for bridge fdb show 2016-07-20 12:02:02 -07:00
tc tc: flower: Classify packets based port ranges 2018-11-20 14:34:56 -08:00
testsuite testsuite: build generate_nlmsg with QUIET_CC 2018-11-09 08:07:18 -08:00
tipc tipc: Drop unused variable 'genl' 2018-10-22 10:05:43 -07:00
.gitignore Remove leftovers from removed Latex documentation 2018-02-13 16:43:19 -08:00
COPYING Update address of FSF in license 2008-03-08 13:31:03 -08:00
Makefile Makefile: Add check target 2018-09-25 09:56:40 +02:00
README README: update libdb build dependency information 2018-05-01 19:29:03 -07:00
README.decnet Decnet documentation update 2005-06-13 18:47:56 +00:00
README.devel README: update location of git repositories, remove broken info link 2018-02-13 16:42:51 -08:00
README.distribution README cleanup's 2012-01-03 15:04:55 -08:00
README.iproute2+tc config: spelling fixes 2018-10-18 13:22:25 -07:00
README.lnstat Rename: misc/README.lnstat -> README.lnstat 2004-10-19 20:24:47 +00:00
configure Pass CPPFLAGS to the compiler 2018-11-09 08:07:18 -08:00

README

This is a set of utilities for Linux networking.

Information:
    https://wiki.linuxfoundation.org/networking/iproute2

Download:
    http://www.kernel.org/pub/linux/utils/net/iproute2/

Stable version repository:
    git://git.kernel.org/pub/scm/network/iproute2/iproute2.git

Development repository:
    git://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git

How to compile this.
--------------------
1. libdbm

arpd needs to have the berkeleydb development libraries. For Debian
users this is the package with a name like libdbX.X-dev.
DBM_INCLUDE points to the directory with db_185.h which
is the include file used by arpd to get to the old format Berkeley
database routines.  Often this is in the db-devel package.

2. make

The makefile will automatically build a config.mk file which
contains definitions of libraries that may or may not be available
on the system such as: ATM, ELF, MNL, and SELINUX.

3. To make documentation, cd to doc/ directory , then
   look at start of Makefile and set correct values for
   PAGESIZE=a4		, ie: a4 , letter ...	(string)
   PAGESPERPAGE=2	, ie: 1 , 2 ...		(numeric)
   and make there. It assumes, that latex, dvips and psnup
   are in your path.

4. This package includes matching sanitized kernel headers because
   the build environment may not have up to date versions. See Makefile
   if you have special requirements and need to point at different
   kernel include files.

Stephen Hemminger
stephen@networkplumber.org

Alexey Kuznetsov
kuznet@ms2.inr.ac.ru