knowledgebase:pbr_freebsd
Table of Contents
Policy based routing in FreeBSD
Status: not testet, maybe not complete
Problem
If you have multiple interfaces on a based router, with multiple default routes (in this case two), dynamic routing with BGP or OSPF, have multiple routing tables and want traffic from a specific subnet to use a specific default route, with Linux you will do something like this:
- setup default route for the router into the default routing table
- setup dynamic routing protocols with bird
- export routes into a second routing table
- export second default route received via a dynamic routing protocol, into a third routing table
- setup policy routing with ip rule
- redirect all traffic to the second routing table (the one without a default route)
- if no route matches: redirect traffic from specific subnet to third routing table
- last rule: redirect traffic to default routing table
Solution
maybe with ipfw setfib
Usefull links
- Unordered List Item
Todo
graphic for illustration
knowledgebase/pbr_freebsd.txt · Last modified: 2023/04/30 16:58 by 127.0.0.1