The FRRouting Protocol Suite
Find a file
Donald Sharp e5c83d9b31 pbrd: Add PBR to FRR
This is an implementation of PBR for FRR.

This implemenation uses a combination of rules and
tables to determine how packets will flow.

PBR introduces a new concept of 'nexthop-groups' to
specify a group of nexthops that will be used for
ecmp.  Nexthop-groups are specified on the cli via:

nexthop-group DONNA
  nexthop 192.168.208.1
  nexthop 192.168.209.1
  nexthop 192.168.210.1
!

PBR sees the nexthop-group and installs these as a default
route with these nexthops starting at table 10000
robot# show pbr nexthop-groups
Nexthop-Group: DONNA Table: 10001 Valid: 1 Installed: 1
	Valid: 1  nexthop 192.168.209.1
	Valid: 1  nexthop 192.168.210.1
	Valid: 1  nexthop 192.168.208.1

I have also introduced the ability to specify a table
in a 'show ip route table XXX' to see the specified tables.

robot# show ip route table 10001
Codes: K - kernel route, C - connected, S - static, R - RIP,
       O - OSPF, I - IS-IS, B - BGP, P - PIM, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
       F - PBR,
       > - selected route, * - FIB route

F>* 0.0.0.0/0 [0/0] via 192.168.208.1, enp0s8, 00:14:25
  *                 via 192.168.209.1, enp0s9, 00:14:25
  *                 via 192.168.210.1, enp0s10, 00:14:25

PBR tracks PBR-MAPS via the pbr-map command:

!
pbr-map EVA seq 10
  match src-ip 4.3.4.0/24
  set nexthop-group DONNA
!
pbr-map EVA seq 20
  match dst-ip 4.3.5.0/24
  set nexthop-group DONNA
!

pbr-maps can have 'match src-ip <prefix>' and 'match dst-ip <prefix>'
to affect decisions about incoming packets.  Additionally if you
only have one nexthop to use for a pbr-map you do not need
to setup a nexthop-group and can specify 'set nexthop XXXX'.

To apply the pbr-map to an incoming interface you do this:

interface enp0s10
 pbr-policy EVA
!

When a pbr-map is applied to interfaces it can be installed
into the kernel as a rule:

[sharpd@robot frr1]$ ip rule show
0:	from all lookup local
309:	from 4.3.4.0/24 iif enp0s10 lookup 10001
319:	from all to 4.3.5.0/24 iif enp0s10 lookup 10001
1000:	from all lookup [l3mdev-table]
32766:	from all lookup main
32767:	from all lookup default

[sharpd@robot frr1]$ ip route show table 10001
default proto pbr metric 20
	nexthop via 192.168.208.1 dev enp0s8 weight 1
	nexthop via 192.168.209.1 dev enp0s9 weight 1
	nexthop via 192.168.210.1 dev enp0s10 weight 1

The linux kernel now will use the rules and tables to properly
apply these policies.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-04-06 13:22:43 -04:00
alpine alpine: add APKBUILD to .gitignore 2018-03-22 13:27:50 +01:00
babeld *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
bgpd Merge pull request #2002 from qlyoung/remove-undebug 2018-04-04 20:52:08 -04:00
debianpkg debianpkg: add libpython-dev to 17.10 & 18.04 build dependencies 2018-04-06 17:14:55 +10:00
doc Merge pull request #2022 from qlyoung/warn-vtysh-u-security 2018-04-04 20:54:31 -04:00
docker alpine packaging: build packages and base image directly from git 2018-04-04 10:05:44 -07:00
eigrpd *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
fpm build: clean up BUILT_SOURCES 2017-08-04 11:13:55 +02:00
gdb gdb: Add a directory of files with gdb macros 2016-05-26 15:33:30 +00:00
include *: PBR - netlink interaction and basic definitions 2018-03-09 11:07:41 -05:00
init build: delete .cvsignore files 2011-12-13 14:27:01 +04:00
isisd *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
ldpd *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
lib pbrd: Add PBR to FRR 2018-04-06 13:22:43 -04:00
m4 build: non-recursive auxiliary directories 2017-07-31 23:03:30 +02:00
nhrpd *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
ospf6d *: Only test CONFDATE when VERSION_TYPE_DEV defined 2018-04-03 13:47:50 -04:00
ospfclient *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
ospfd *: Only test CONFDATE when VERSION_TYPE_DEV defined 2018-04-03 13:47:50 -04:00
pbrd pbrd: Add PBR to FRR 2018-04-06 13:22:43 -04:00
pimd bgpd, pim: remove undebug 2018-04-02 16:03:11 -04:00
pkgsrc *: Remove cvs control points 2017-12-05 17:28:12 -05:00
ports pimd: merge pimd as of 2015-01-19 2016-05-25 20:38:32 -04:00
python zebra: unify the ipv4/ipv6 'show ip route' commands - part 1/2 2017-10-24 10:12:40 -02:00
qpb *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
redhat pbrd: Add PBR to FRR 2018-04-06 13:22:43 -04:00
ripd *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
ripngd *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
sharpd sharpd: Add ability to register for nht 2018-03-16 12:27:22 -04:00
snapcraft build: non-recursive auxiliary directories 2017-07-31 23:03:30 +02:00
solaris gitignore: update references to FRR 2017-07-12 11:55:04 -05:00
tests bgpd: nexthop tracking with labels for vrf-vpn leaking 2018-04-04 10:00:23 -07:00
tools pbrd: Add PBR to FRR 2018-04-06 13:22:43 -04:00
vtysh pbrd: Add PBR to FRR 2018-04-06 13:22:43 -04:00
watchfrr *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
zebra Merge pull request #2028 from qlyoung/cleanup-static-route-consistent-ordering 2018-04-04 20:55:59 -04:00
.clang-format ospfd: LSDB_LOOP treat it as a loop. 2018-01-17 13:29:58 -05:00
.dir-locals.el .dir-locals.el: show trailing whitespace 2017-11-07 12:05:09 -05:00
.dockerignore alpine packaging: build packages and base image directly from git 2018-04-04 10:05:44 -07:00
.gitignore *: globally ignore clippy-generated source 2018-03-09 17:52:15 -05:00
AUTHORS Initial revision 2002-12-13 20:15:29 +00:00
bootstrap.sh autoreconf -i 2007-02-06 19:28:28 +00:00
buildtest.sh config: switch a few references to say FRR 2017-07-12 11:25:33 -05:00
ChangeLog Rename: freerangerouting --> frrouting 2017-03-30 14:24:05 -04:00
common.am frr: --enable-address-sanitizer 2018-03-21 20:47:34 -04:00
COMMUNITY.md frr, doc: Move COMMUNITY.md to doc/developer/workflow.rst 2018-03-19 13:56:43 -04:00
configure.ac pbrd: Add PBR to FRR 2018-04-06 13:22:43 -04:00
COPYING *: make consistent & update GPLv2 file headers 2017-05-15 16:37:41 +02:00
COPYING-LGPLv2.1 build: remove LGPL v2.0, add LGPL v2.1 2016-11-15 17:19:38 +09:00
defaults.h *: reindent 2017-07-17 14:04:07 +02:00
Makefile.am pbrd: Add PBR to FRR 2018-04-06 13:22:43 -04:00
NEWS release: 0.99.24 2016-06-03 15:56:44 -04:00
README frr: update README 2018-01-16 15:54:32 -05:00
README.NetBSD config: switch a few references to say FRR 2017-07-12 11:25:33 -05:00
REPORTING-BUGS config: switch a few references to say FRR 2017-07-12 11:25:33 -05:00
SERVICES babeld/eigrpd: flip VTY ports & fix rpm 2017-06-13 14:36:55 +02:00
stamp-h.in Initial revision 2002-12-13 20:15:29 +00:00
update-autotools * README.NetBSD: use update-autotools instead of autoreconf 2007-02-02 16:52:38 +00:00

FRRouting is free software that implements and manages various IPv4 and IPv6
routing protocols.

Currently FRRouting supports BGP4, BGP4+, OSPFv2, OSPFv3, RIPv1, RIPv2, RIPng,
IS-IS, PIM-SM/MSDP, LDP and Babel as well as very early support for EIGRP and
NHRP.

See the file REPORTING-BUGS to report bugs.

See COMMUNITY.md for information on contributing.

Free RRRouting is free software. See the file COPYING for copying conditions.

Public email discussion can be found at https://lists.frrouting.org/listinfo

Our public slack channel is at https://frrouting.slack.com