Hi Guys,
I have been working through the CBT nuggets for ROUTE and the associated labs that come with them. I've just gone through Policy routing and have a few queries.
In the PBR lab I was doing, the scenario is that 2 clients are connected to a router that is connected 2 different ISPs.
The first objective is:
"Client1 surfs the Internet all day doing nothing productive. All traffic from this client should route out ISP2, which is a slower Internet connection. If ISP2 is down, Client1 should not be able to access the Internet."
the first part of this is easy enough using an access-list and route map
ip access-list extended client_1
permit ip host 192.168.1.20 any
route-map POLICY permit 10
match ip address client_1
set ip next-hop 201.1.1.2
interface FastEthernet0/0
ip address 192.168.1.1 255.255.255.0
ip policy route-map POLICY
This forces any traffic from client 1 to use next hop 201.1.1.2, but does not complete the second part of the objective "If ISP2 is down, Client1 should not be able to access the Internet."
In the CBT nugget Jeremy configured the access-list and route-map the same as I did and said that the objective was achieved.. But he did not not verify the behaviour if ISP 2 was failed.
My understanding of PBR is that if the specified next hop is in the routing table, then the PBR is applied and the packet is forwarded to that next hop
But...
If the specified next hop is not in the routing table then PBR is ignored and the packet is forwarded as per the routing table, ISP1 in this case. I have verified that this is the behaviour in the lab if I fail the connection to ISP 2
So, my question is: What is the best way to achieve this objective?
I have tried 2 ways, which both seem to work:
1. set an access-list on the alternative exit interfaces(ISP1), denying client 1's IP - so if ISP2 fails the PBR will be ignored, as the specified next hop is no longer valid, and the router will fall back to using the routing table. However, the access-list will prevent the packet leaving from the interface specified in the routing table
2. I added a second set statement to the route-map, setting the output interface to Null0, effectively discarding the packet.
route-map policy permit 10
match ip address client_1
set ip next-hop 201.1.1.2
set interface Null0
I think that this is effectively saying:
IF address is matched by the access-list
AND the specified next-hop address is in the routing table
THEN forward the packet to the specified next-hop
ELSE forward the packet to the interface Null0
Am i right about this? and are either of these methods valid, efficent ways of achieving the objective?
as always, your comments are appreciated