Policy-based routing for any interface?

I’ve been tinkering and breaking things so I thought I’d raise a hand for some guidance…

I think I want to use policy-based routing to direct traffic destined for a particular subnet to use a specific routing table. It seems like I have to set interfaces <interface> <name> policy route <name> to assign the policy to the ingress interfaces that the policy should apply to — but I’m not sure this is exactly what I want to do.

This is for integrating with AMPRNET, for anyone curious. The destination subnet is (for simplicity) All traffic to that subnet should egress on a tunnel interface. I have a custom binary tool that listens for RIP broadcasts from AMPRNET and adds routes directly to either the main table or a table I can specify. I have all this working just fine, if I send the routes to the main table. That’s not really a problem, but it seems untidy. And I want to understand better how to work with routing tables and PBR.

So let’s say I configure the external tool to add those routes to table 44. I want traffic originating from any interface and destined for to be routed according to table 44.

I can do that with:

set policy route AMPRNET rule 10 destination address
set policy route AMPRNET rule 10 set table 44

But I’m not sure where to proceed from here.

Do I need to assign this policy to every single other interface? (Somehow this doesn’t seem right to me)

If I do, will those interfaces use the main table for all other destination subnets? Do I need to specify some other rule(s) to direct all other traffic to the main table?

Is there a different/better approach whereby I can have the policy applied globally, without having to set it for every interface?

Thanks for any insights.

You can use “policy local-route”. It doesn’t require setting any interface.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.