Professional Documents
Culture Documents
Routing Table Matcher
Routing Table Matcher
R1 is ISP router sending BGP routes R2 is client's main gateway and clients local network is 192.168.1.0/24
After setting up bgp peering (which is not covered in this article) we get following BGP routes
Next step is to add all received BGP rotues to another routing table, to do that we set up routing filters
As you can see now routes are added to "local" routing table
...
Manual:Routing Table Matcher 2
Following mangle rule will match all packets that destination is resolved in "local" routing table.
Now when we try to send packets from the client for example to address 10.10.10.4, mangle rule will not match
anything. This is because by default every destination is resolved in "main" routing table.
To fix this we have to explicitly specify to resolve all packets coming from client in "local" routing table.
As you can see from the logs only packets coming from the client are matched. The reason for this is because
routing-table matcher is matching only packet which destination address is resolved in local routing table. In our
example 192.168.1.10 as destination is resolved in "main" routing table.
From what was said above, this approach is useful only for upload traffic marking and shaping.
Article Sources and Contributors 3