I have a Cisco C3560X with multiple internal networks (10.0.0.0/24, 10.0.1.0/24, et.) and two internet connections (10.0.0.3 and 10.0.0.4). The default gateway for the internal subnets is the switch (10.0.0.1), and the 0.0.0.0 route in the switch is the internet connection at 10.0.0.4.
I have one host (10.0.0.11) that I need to use the 10.0.0.3 connection instead of .4
I think that policy based routing will let me do this, but all of the examples I have seen don't address an important requirement I have: the host in question needs to be able to talk to hosts on other internal subnets, 10.0.1.0/24 for example. The examples appear to route any traffic from the host to that next hop, not differentiating between destinations.
How can I configure PBR to send internet traffic for one host out an alternate connection, while still being able to reach other hosts on other internal subnets?
0.0.0.0/0
is the least specific route there is. Routing10.0.0.0/8
to one gateway and0.0.0.0/0
to a different gateway means that the more specific/8
route will be used for the10.0.0.0/8
network, and anything else will go to the default route, which is called the route of last resort just for that reason.