12-13-2022 12:37 AM
I need to tell my pc to go to a certain target ip through an existing router interface ip , but according to cisco PBR doc , the PBR will only be used if there no existing specific static route "ex. ip route xxxx xxxx xxxx" which i do have . like for example the target ip is 192.168.10.10 and the existing static ip route is
ip route 192.168.10.10 255.255.255.255 192.168.2.1
but I want only my pc 192.168.1.1 to use the below route
ip route 192.168.10.10 255.255.255.255 192.168.3.1
12-13-2022 02:16 AM
that wrong, the PBR work if there is route and if not there is route
the different
if there is route, the router will use route in RIB as failover (if you use verify ) or the traffic is not match ACL you use in PBR
if there is not route, the router will drop packet if next-hop of PBR is down or traffic is not match ACL you use in PBR.
12-13-2022 04:45 AM
Not sure what is the goal here.
Are you looking source 192.168.10.10 destiantion - ? (this was not clear)
you man 192.168.10.10 going to 192.168.1.1 to use 192.168.3.1 ?
PBR need source and destination, so that can be changes to different next hop based on the route-map.
what was not worked ?
Policy-Based Routing
Policy-based routing is a process whereby the device puts packets through a route map before routing them. The route map determines which packets are routed to which device next. You might enable policy-based routing if you want certain packets to be routed some way other than the obvious shortest path. Possible applications for policy-based routing are to provide equal access, protocol-sensitive routing, source-sensitive routing, routing based on interactive versus batch traffic, and routing based on dedicated links. Policy-based routing is a more flexible mechanism for routing packets than destination routing.
12-13-2022 09:12 PM
see as of now there is an ip route as below on the core for all users 192.168.1.0/24
ip route 192.168.10.10 255.255.255.255 192.168.2.1
I want my pc only with ip 192.168.1.1 to go to 192.168.10.10 through 192.168.3.1 instead of the above 192.168.2.1
12-14-2022 01:18 AM
how is your network diagram look like.
you can do route map example :
ACL :
access-list 100 permit host 192.168.1.1 host 192.168.10.10
!
mat the ACL :
route-map host_route
match ip address 100
set ip next-hop 192.168.2.1
apply rule to interface :
interface gi0/0 or vlan x
ip policy route-map host_route
Note : this will have only outbound control on this routemap.
12-14-2022 12:38 AM - edited 12-14-2022 05:46 AM
apply PBR to egress with following
ip access-list extended 100
permit ip host 192.168.1.1 host 192.168.10.10
!
route-map MHM permit 10
match ip address 100
set ip next-hop 192.168.3.1
interface x
policy route-map MHM
NOTE:- you CAN use set interface <interface toward 192.168.3.1> OR set ip next-hop192.168.3.1
12-20-2022 09:32 PM
on which interface do i apply the routemap? on the interface vlan of 192.168.1.0/24 ?
12-20-2022 11:15 PM
Yes correct
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide